Skip to content

Commit

Permalink
Merge branch 'cleanup_field_and_proofVerifier_usages' into mempool_ba…
Browse files Browse the repository at this point in the history
…tch_verification
  • Loading branch information
abi87 committed Apr 7, 2021
2 parents e887979 + 6489a41 commit ab14627
Show file tree
Hide file tree
Showing 34 changed files with 591 additions and 797 deletions.
11 changes: 5 additions & 6 deletions src/coins.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

#include "coins.h"

#include "memusage.h"
#include "random.h"
#include "version.h"
#include "policy/fees.h"
Expand Down Expand Up @@ -1076,8 +1075,8 @@ bool CCoinsViewCache::RevertTxOutputs(const CTransaction& tx, int nHeight)
#ifdef BITCOIN_TX
int CCoinsViewCache::GetHeight() const {return -1;}
bool CCoinsViewCache::CheckEndEpochBlockHash(const CSidechain& info, int epochNumber, const uint256& endEpochBlockHash) const {return true;}
bool CCoinsViewCache::IsCertApplicableToState(const CScCertificate& cert, libzendoomc::CScProofVerifier& scVerifier) const {return true;}
bool CCoinsViewCache::IsScTxApplicableToState(const CTransaction& tx, libzendoomc::CScProofVerifier& scVerifier) const { return true;}
bool CCoinsViewCache::IsCertApplicableToState(const CScCertificate& cert, CScProofVerifier& scVerifier) const {return true;}
bool CCoinsViewCache::IsScTxApplicableToState(const CTransaction& tx, CScProofVerifier& scVerifier) const { return true;}
#else

int CCoinsViewCache::GetHeight() const
Expand Down Expand Up @@ -1126,7 +1125,7 @@ bool CCoinsViewCache::CheckCertTiming(const uint256& scId, int certEpoch) const
return true;
}

bool CCoinsViewCache::IsCertApplicableToState(const CScCertificate& cert, libzendoomc::CScProofVerifier& scVerifier) const
bool CCoinsViewCache::IsCertApplicableToState(const CScCertificate& cert, CScProofVerifier& scVerifier) const
{
const uint256& certHash = cert.GetHash();

Expand Down Expand Up @@ -1249,7 +1248,7 @@ bool CCoinsViewCache::CheckScTxTiming(const uint256& scId) const
return true;
}

bool CCoinsViewCache::IsScTxApplicableToState(const CTransaction& tx, libzendoomc::CScProofVerifier& scVerifier) const
bool CCoinsViewCache::IsScTxApplicableToState(const CTransaction& tx, CScProofVerifier& scVerifier) const
{
if (tx.IsCoinBase())
return true;
Expand Down Expand Up @@ -1300,7 +1299,7 @@ bool CCoinsViewCache::IsScTxApplicableToState(const CTransaction& tx, libzendoom
if (!CheckScTxTiming(scId))
return false;

boost::optional<libzendoomc::ScVk> wMbtrVk = this->AccessSidechain(scId)->creationData.wMbtrVk;
boost::optional<CScVKey> wMbtrVk = this->AccessSidechain(scId)->creationData.wMbtrVk;

if(!wMbtrVk.is_initialized())
{
Expand Down
4 changes: 2 additions & 2 deletions src/coins.h
Original file line number Diff line number Diff line change
Expand Up @@ -672,14 +672,14 @@ class CCoinsViewCache : public CCoinsViewBacked
bool GetSidechain(const uint256 & scId, CSidechain& targetSidechain) const override;
void GetScIds(std::set<uint256>& scIdsList) const override;

bool IsScTxApplicableToState(const CTransaction& tx, libzendoomc::CScProofVerifier& scVerifier) const;
bool IsScTxApplicableToState(const CTransaction& tx, CScProofVerifier& scVerifier) const;
bool CheckScTxTiming(const uint256& scId) const;
bool UpdateSidechain(const CTransaction& tx, const CBlock&, int nHeight);
bool RevertTxOutputs(const CTransaction& tx, int nHeight);
int getScCoinsMaturity();

//CERTIFICATES RELATED PUBLIC MEMBERS
bool IsCertApplicableToState(const CScCertificate& cert, libzendoomc::CScProofVerifier& scVerifier) const;
bool IsCertApplicableToState(const CScCertificate& cert, CScProofVerifier& scVerifier) const;
bool CheckEndEpochBlockHash(const CSidechain& sidechain, int epochNumber, const uint256& epochBlockHash) const;
bool CheckCertTiming(const uint256& scId, int certEpoch) const;
bool UpdateSidechain(const CScCertificate& cert, CBlockUndo& blockUndo);
Expand Down
4 changes: 2 additions & 2 deletions src/gtest/libzendoo_test_files.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ const std::vector<unsigned char> SAMPLE_FIELD = {
88, 23, 236, 142, 237, 45, 11, 148, 91, 112, 156, 47, 68, 229, 216, 56, 238, 98, 41, 243, 225, 192, 1, 0
};

const std::string SAMPLE_VK = "f49e31a9d99636bc0ee38962cfddaf2e2ea040f1828d8fccd989b0f4aa523d62a94036319df4c7b751b19dba7a01441fbbde58e6c774c9311384763904d6740120f487d4f7b83c429acb4a278d9191b207a7502dcc2543a23d0ad763b25e0100ba7536fc1b63f6589992e8a5ae9eb15f645d17f574be12dfb473ebcd37642286035a4a0650b62736f9d009b124f3b4a5da3dd7dc4c59001ad8368fd0848d5d8c7d50e9d9f55a9c20ad7f097ef593c42b828c471fa0022c7dad1d5cfe008c0100d3e4f0c7b8c3ba234db750bbfc67ffcdc2cb750ddc6bce547930960c81941a15a7c3844057713b1d6670251c7a9f19bd9a7c765e26d4a288309591d8190484f7087c1b21212e3c7f9626436bb769ec57ce5beb5c232a862f62556febdc71000085b19ed25ec88257764c18a11b0d6ebc43a76c4eef4577fb9e3ae6557ee57ff42838ae8c0a2f7917a50182fd806da8ca46b8adac2cd379ba559d1652d5e393a4d8079af0c372c5f83df2f5c107e4f838335480822ea06004fc4bf89d2c0801003c8402cc388ad55b0ce811abb14bfd76699028cb80bbc7078658ba994ee80e538d9213a9a8e7d5f164a60ee70d5da543df9eeb3fced0e84de0de31090115794dc88cf14f977ad63f8f8b647cd44cf2e17cb0f56c7ac7a7989cfaacac575600007a4006d5f52247f36aa5a1432201b97eb794f9e4d1b4e481bb16fed0d4ec3bc3774fc5a3be9d6eb460614bab0068483831e7b3544538984797a81ddd1962fa3e1e55f48fe8d2ccbc1425d8db6be180bcd78d98b3f0c54ee909bac34ef39401002cbc86a4ec136de594dfdb0ab694a625a4e14dd4b6ce95b5aff999231019fdadd38437cd212ea273f6d891aa2fdc10ddf2212a83eb64dc97dc8be588961889da1555c32f6821c08a6eb905a0ec7aad21032347b59137eff0974aeebad2070000c49a3eee2db049e2db7f005e17ece264144d707a658882ad98fb0de7eea7b66d0e78719c19f85f02cf098c66fc494aea7b6dae2d1b69f8b43627ae2b056eb593c916205dbc7161f46033eb55dff24937a082046d66283add6eb1e51ba3ae00000052750df4e6429d06e660dea6f3399d95420055be8023d6df8f0c4b6a517d4e8a53692aa468b0653dd5810f13006d219dfca9c3da4aae282eaafb7701c526fc8cc69ccad3064a424486f72677ab803656e122b7400c7922ac428db3011aa601004eb060adf4edf4896e5e0071dd8697a04db4180c35fd2629f6680fe2a380cd4a66da8d64461d3a1ba3309ad2e6b4db8cecf8487ddb0ca1d4605a30bcecefed92f08f93ddd79d7a1653730d003aba00a4dd50cdef0570b09f11a3ba9b5b61000017645121c383f44302aad088403f4256c02258b8bd098463cc7ae6043977e537a8ee2c5c74e82098f66dd3454ac23895dbb29b9dee3343e4db42d53aa4eb96de0be5db721dd6f8415a172141730c5c0f7c5381da0b6aa44fe5300f20bf6e0100c3745b9587d832779cde8b2640310bf692ce853660eef28aa0c5fc94e18b772cabea8a4c776ffdfaad0df37b26a9969e1e5dfddd1db1e24603be9c2a4dc900c95b2a3176efeaa56885795355100232c18511b678042cb13daf01f057a31101000000000002b4f8391b627cf2d41ed914526291b045bf2eaa9d5327bc35df43748f929f5a702689bbb2bd75ebc385dff0bd7a262a85bd9fc7c5fea7342b47e507ebb4d63a85cf1d8307e6729b6447775daec91f86051ada0fdef47e87ad8d5a4e7d001c0100890add321122287c801ad68759b289f0fa4ccf555860cabd311949340ca3b473199afc76073c6e8a93ec950bf2a94a7aa8c7f62a083ba8c6ca49f6f7fcfd14453e9289c875d269f0dcfc4e89b77a55819e95cd73487f17ca40aaf1915e21000000b9064564d447519777287affea4e8ba48229af4f4142b9dafe3ab53f9a27abb4b288f3e8c3ad6f868e140c4e228c0ad042ab5401b1ff9c8e0e38d2781d188558c096301e1afa58aece79072c39465031628e7a2c252d318b7b94fb99bf9b01004ab688d3cc9b0455dc9625661ec71655e74f9ccb521ffa3a7ec525d9ec1fe18d2e4e32de65acc590d27f2db978d695dc73bab1a0b25e22ba3bf92210b54f456f5ced97f6cbad6f0d7eef4f6304395cb7ec8cdb50612534cae31a7f48b5ab010000";
const std::string SAMPLE_PROOF = "927e725a39f1c219a458f02d27fb327cc9595985ed947553d979261261b96360b23633b747df8141bcb12076b75f654c35ba0869df74a236763fe0c070e6da2959c1a8c77330783e76e4ad5801818c5edb06567196813355bea5e08beaa5010088965b13b48cbf962106500727ba05b31b4f429076230a90384d18b0e5f395a87ea466704a56375d3a68e65777568881b432208029c12cda5d089f596cf91da14392ed6c619c195a6bebe04c2caba17443906fbf386bc4555b0b721a1ead0000007acd59b470379a38d8de9e82b54fdd1e4e8bd8b2059b62552814989c25f7e07c6261ebc6de8b4b875893a874df953594beb119d53fd74e33e09cb66ed717c393c3fd22f1b465332a17c3d934172fdd33d1c641a9121c5e762b6e59305d1d0100ec5aed56c4290c6bb57e1d1b5b2b1f861f9926403446482f72cede346c0feae2817a2f18b7a37a9b55a3e9deb2a555ffb0d9331cb320ce18aa99a2c2c025c3d28afc77c631263b91160b1f556a6d1d158a8d3c56ab61dc9396e6536094720000741ae2c1569b098231dce089680fb1e561d974ce4f4e00cbe1150281ce12dd561be12a7fefcb30f62d3c8934926ae4eb4a4cb4378dd2568648ff12a7c36302be4d5a578dc360a3125b0c1427fb6b55a067f01d24d616c954bce363a8ef1001003a1ebe119da0561bf1d3294819759677fbd37dbac403662e263bfa71a4992228557a31d2d9ce0a7ffcbe91aa57f38cae7b51ef2681b16f275c0f87c89fbc2060690ac77dc1d3d20b7d3c6b5af1c92ee96e61b6635e343c3976112eb4ec91000000fe60207ddf86be08604c41f46f2e3740b479cad9fd1cb5f8c589595ba3d50f6c3984bbe707d460a0e27d4ec90d89a3476c647a6ea262b910dcb267325c375c713ff7031fe3a200130060bf09900e2e5244f88355a2a0587b068caae7f65b01005f0fb082380604a78c66e21681c2c7f3f59042c7b4495435b8d972bbb535ae8dd09ea8232b0161dc3a13f4a718b5a7fa4cb01d6625e38d73032baf3a9ffcff5a7493a27eeab25c97bee8eddf2fd2c9e9dd1bd1813c22b046c01caccc7478000000";
const std::string SAMPLE_PROOF_NO_BWT = "3a8b33f74e01ad7006ff6a6d547a4f5e73117facd51591d05099ff7200e4c7693d90f76ba44cf5519ae5adc20b22d18f029480cf8dce67bb582693d53f26ced3bf28feafdf97d5cf9cb6b70fc3c27d9322f085d64969fe313198d94d88de0000a2658f5b45e46769d1ab7c77a96afa69d84f9194321d36f866f2b04b5f30365149566f903dc6e4fa27beb5e30f889457c49f21152e16a190ed8426da16d2aaecec8a85ee4e27d8f12fc1193db4d37a98341c78a94f0c60088315e1a708a4000000f8d580ce3006937688826df8d39a01fbb6e10491953423e6f4a4e54db917f8ae725d86051307ec22c2dd2384fbad6bc0b2569420b0741d9b7b75e3c4adde82836eb56a5049b106fddbcb058e6e75f1b08f0592a42412169285a7281b8fc40100cfbc824a2ba57043d000d65a1750ed519ed3f97fe4ef2dc987126769d64419e6666705eccef3fbbf7f6a00ab1d4c3ba222a7acb997e5da9905b40c8a2c850057c0c7829047b09d19a3ecea21fa7bc4880640d5ff5f4f65e63d5c70db744f0000877da85864e8af65c1c20a5e66438a7756515c903bc68c1f91865bf0c7f6171b0e59f7bf96661e9d96457ee25626b8d272faabcb3b1d61c7093d74438455274674e21068d59582bf05155bb2b4eb56173f14cbaa747c997c2549b5d7bb9b01000ba6a871bb5e481720d99f8a76e538b8f9ffaa6201e35a08f02929ad39893681026440b38d8b2a96edad600e33976357b5393d3dcca4c9867e9b3702df91a85e03174c1312edf82300cd3f040d199e43b14df4bb07281ddbf9147b1e3fe30000007e5f0442e49b6783e1b7c47ec3cc538130535b4d78efe659b52233c6efe2b8a421a6112cb59d2797310a07ffe4baa895016913ee01d26f6b4affc9a22d0a0ed24fef5a9c1265a3e137de58efd5088e60880e3e1e3f7137c0cac03bdd8f4201005e099377c505054fb0440394829ef2166d0ac455df3b6b9f9ca91632b54f0d936f1c8be22bf0fe7df014e69c932a00d6f4c1618559507388255fd84ed9fd015d1b98a6fdf7b4e1e43ccd624f0c19486fd31772772981a08df022d4c87346010000";

const std::string SAMPLE_VK = "f49e31a9d99636bc0ee38962cfddaf2e2ea040f1828d8fccd989b0f4aa523d62a94036319df4c7b751b19dba7a01441fbbde58e6c774c9311384763904d6740120f487d4f7b83c429acb4a278d9191b207a7502dcc2543a23d0ad763b25e0100ba7536fc1b63f6589992e8a5ae9eb15f645d17f574be12dfb473ebcd37642286035a4a0650b62736f9d009b124f3b4a5da3dd7dc4c59001ad8368fd0848d5d8c7d50e9d9f55a9c20ad7f097ef593c42b828c471fa0022c7dad1d5cfe008c0100d3e4f0c7b8c3ba234db750bbfc67ffcdc2cb750ddc6bce547930960c81941a15a7c3844057713b1d6670251c7a9f19bd9a7c765e26d4a288309591d8190484f7087c1b21212e3c7f9626436bb769ec57ce5beb5c232a862f62556febdc71000085b19ed25ec88257764c18a11b0d6ebc43a76c4eef4577fb9e3ae6557ee57ff42838ae8c0a2f7917a50182fd806da8ca46b8adac2cd379ba559d1652d5e393a4d8079af0c372c5f83df2f5c107e4f838335480822ea06004fc4bf89d2c0801003c8402cc388ad55b0ce811abb14bfd76699028cb80bbc7078658ba994ee80e538d9213a9a8e7d5f164a60ee70d5da543df9eeb3fced0e84de0de31090115794dc88cf14f977ad63f8f8b647cd44cf2e17cb0f56c7ac7a7989cfaacac575600007a4006d5f52247f36aa5a1432201b97eb794f9e4d1b4e481bb16fed0d4ec3bc3774fc5a3be9d6eb460614bab0068483831e7b3544538984797a81ddd1962fa3e1e55f48fe8d2ccbc1425d8db6be180bcd78d98b3f0c54ee909bac34ef39401002cbc86a4ec136de594dfdb0ab694a625a4e14dd4b6ce95b5aff999231019fdadd38437cd212ea273f6d891aa2fdc10ddf2212a83eb64dc97dc8be588961889da1555c32f6821c08a6eb905a0ec7aad21032347b59137eff0974aeebad2070000c49a3eee2db049e2db7f005e17ece264144d707a658882ad98fb0de7eea7b66d0e78719c19f85f02cf098c66fc494aea7b6dae2d1b69f8b43627ae2b056eb593c916205dbc7161f46033eb55dff24937a082046d66283add6eb1e51ba3ae00000052750df4e6429d06e660dea6f3399d95420055be8023d6df8f0c4b6a517d4e8a53692aa468b0653dd5810f13006d219dfca9c3da4aae282eaafb7701c526fc8cc69ccad3064a424486f72677ab803656e122b7400c7922ac428db3011aa601004eb060adf4edf4896e5e0071dd8697a04db4180c35fd2629f6680fe2a380cd4a66da8d64461d3a1ba3309ad2e6b4db8cecf8487ddb0ca1d4605a30bcecefed92f08f93ddd79d7a1653730d003aba00a4dd50cdef0570b09f11a3ba9b5b61000017645121c383f44302aad088403f4256c02258b8bd098463cc7ae6043977e537a8ee2c5c74e82098f66dd3454ac23895dbb29b9dee3343e4db42d53aa4eb96de0be5db721dd6f8415a172141730c5c0f7c5381da0b6aa44fe5300f20bf6e0100c3745b9587d832779cde8b2640310bf692ce853660eef28aa0c5fc94e18b772cabea8a4c776ffdfaad0df37b26a9969e1e5dfddd1db1e24603be9c2a4dc900c95b2a3176efeaa56885795355100232c18511b678042cb13daf01f057a31101000000000002b4f8391b627cf2d41ed914526291b045bf2eaa9d5327bc35df43748f929f5a702689bbb2bd75ebc385dff0bd7a262a85bd9fc7c5fea7342b47e507ebb4d63a85cf1d8307e6729b6447775daec91f86051ada0fdef47e87ad8d5a4e7d001c0100890add321122287c801ad68759b289f0fa4ccf555860cabd311949340ca3b473199afc76073c6e8a93ec950bf2a94a7aa8c7f62a083ba8c6ca49f6f7fcfd14453e9289c875d269f0dcfc4e89b77a55819e95cd73487f17ca40aaf1915e21000000b9064564d447519777287affea4e8ba48229af4f4142b9dafe3ab53f9a27abb4b288f3e8c3ad6f868e140c4e228c0ad042ab5401b1ff9c8e0e38d2781d188558c096301e1afa58aece79072c39465031628e7a2c252d318b7b94fb99bf9b01004ab688d3cc9b0455dc9625661ec71655e74f9ccb521ffa3a7ec525d9ec1fe18d2e4e32de65acc590d27f2db978d695dc73bab1a0b25e22ba3bf92210b54f456f5ced97f6cbad6f0d7eef4f6304395cb7ec8cdb50612534cae31a7f48b5ab010000";
const std::string SAMPLE_VK_NO_BWT = "c1b99fdd91d133a81446cbea18e0846d5693dcaa314ea0210b857146edf98798f3cdbfb531de12bb734c3a36b0c3c47fd98c2230ab4c944509ff51f26e7d6073d418909ca050b5bb560ab9ed031929c91e67472b387b3cfc360356f589c5000080a5decb9cad2dda6d76b3a0eaa4248386d2d37260852c9815c72f0c5f1b4f0b1196c6d5b88b2ab38e8061e364e063832be41d64a584f89d6494a2fcd949434c16842ab47aa29b9af6d7234d4cf7788a65965442a94991599e5a7f58288b0000db1a2c729748d8083cbdcd4b39e232a6e19612297fe0ecfae3916b173f33606e04df7e2e8a3261f6b99e3cf1f30181658adba3bf5e5950a1ac7e5134c10693e96a674c15dc31b9c8111aeb4622ac79de4f85377c2eaa8af6b3aa0b87854a00004e7039180e1fa939a6adbf2522efeb3ca57d37fe03b7f3012c7d707839e85c1df8f28c38ca2747d1bd39801ac08f692042a152ef15973da1d1d54cda5628d4376e1793ce73d2d04df9c335ba8860311426096834ba92efdf8a44b5ff59d60000ec0e9192338e9c9734ff5155a06537136e1bfda094679616418e2e835816f5155041b14a226cf61095ae3444eac2d7a6b0c41fcbe63d663d2db678e2e42aca2406d6cab001948dba5b1220797d3217cacc6a5b95dd1d1170f73c7127cbc20000db006110373307d9897dcb95c4ea06d449f264f37659536d2d1dd7fea3e206df7a92dd9b300b27f57cc746bb2cc68f0f2841aa8a50466d8ef04c7d0ef4485649c311dd3c2546082e5f91c7a448ef9b6efd1e68db1cc39c8b640e7c0f236e00007a8df410aa7af13620e632125cafcef28cf6c2ceee3b2acac0455ff875305e66d8043e74356a18c79531fbacca218db43698415343879aa999f3b7e57cf2875526b9cc796004a31645f70337a94dbac78b1d15124dd0d5720318cdf2d02f0000dc9ff7ce8407b7bd309a9d87aa4c72aa96264591a66632e45ad25bcb8019dd6a508f3ac3fe370b071bf60894a9487e1d29074a12e9f01f2e753528ebe4c44c71b9d7657f4487bc016802df764fa20166294231a4678a8f5c3d4dbdf5c4be000000e8a559843980a1422b8e1f0a1c1579869796f11af2b0e5ae53d05c14d51b714d6eff2ead9be5872d0fd63623f32eabb769758d267f1e98f423ddb8922831fb065b981a2fff1ab0cd16882a9c1ee829e83c39d1073d01444c0bede55917680000afac0ce9d6eeb4705437d139caa770223dbedefaedee8d784480bcc5fe567ea826d3eb5c50afd4f43a270ed8a0f9a481d62f32c110fd4adb867ef86cd4484f571daccb5ab71bb5a8736ab07db30e5467735a27de46f8ddb949a9fd0642950100257fe17f42bcc29f902278c0dea3567bf34ed736d41b359fedb8c5c3b8d2bd34e5e1c092f199ba685b876c7276fafcab2d119067ef6116af04bcadaa629dd3147d20c6440ae38bee21fad971b6986ea96a0277ad87dac96446c0371aeaa70000539472364368d355469a09688d4d921b824768bd258d7ee4b118438549eb79a0b92d0b87d6e2a624333b0ed0e1b3940d6aed65253a09b1bae37b4d6ae166cdf8451696e5bc5c68827d57afada76e1820bede4f1b6d8084328e2522be8883000000000000028b2929acdf5af178ced2e1ef1ad053d76b17ea13af39c8d18ccb2f62a6b31ccff5a258b4decf321c8e943dfb1c31860e24b2cf88b04c9287ac3f2c3f0bcd3e1f11385f8ac0a7ce7b93a6c8ff0c386dfe77416540f91430dca1ba31248487000079c3e98bd313689a5b24ff9ed9b4cb777e721c592dd061ddcc11ce5cfc167f9d6c7f744599db8e5387780758f85c2085cd2b90f5560613346f70c813df0a63d9379f71e099fde464101ff61e3e25c169ef043705485864f2bd7f4cc424e5000000407a780ed01f06b41f3e5aa8a201c36c551fb5c079c713d0e7a9780209188504866a8375aabc0bf2bf35614bae0c14117542d92286b28b5a4804455647ac73f61242a335a3b85970f06ac8024102052491044bf72dcd9a312a512a2d5af10000daddd619f782dd8f01048a55930326223c9c1a20cd44d3c5304455f3e4e117a5488b50ef7332399a08df949bc862f9e59e8c99b128f0bbd54da30f397a1c27418e4f00af4a8dd77de3432d29566bc3dd0ac3599bd8036dc2bc4825153d7c010000";
const std::string SAMPLE_PROOF_NO_BWT = "3a8b33f74e01ad7006ff6a6d547a4f5e73117facd51591d05099ff7200e4c7693d90f76ba44cf5519ae5adc20b22d18f029480cf8dce67bb582693d53f26ced3bf28feafdf97d5cf9cb6b70fc3c27d9322f085d64969fe313198d94d88de0000a2658f5b45e46769d1ab7c77a96afa69d84f9194321d36f866f2b04b5f30365149566f903dc6e4fa27beb5e30f889457c49f21152e16a190ed8426da16d2aaecec8a85ee4e27d8f12fc1193db4d37a98341c78a94f0c60088315e1a708a4000000f8d580ce3006937688826df8d39a01fbb6e10491953423e6f4a4e54db917f8ae725d86051307ec22c2dd2384fbad6bc0b2569420b0741d9b7b75e3c4adde82836eb56a5049b106fddbcb058e6e75f1b08f0592a42412169285a7281b8fc40100cfbc824a2ba57043d000d65a1750ed519ed3f97fe4ef2dc987126769d64419e6666705eccef3fbbf7f6a00ab1d4c3ba222a7acb997e5da9905b40c8a2c850057c0c7829047b09d19a3ecea21fa7bc4880640d5ff5f4f65e63d5c70db744f0000877da85864e8af65c1c20a5e66438a7756515c903bc68c1f91865bf0c7f6171b0e59f7bf96661e9d96457ee25626b8d272faabcb3b1d61c7093d74438455274674e21068d59582bf05155bb2b4eb56173f14cbaa747c997c2549b5d7bb9b01000ba6a871bb5e481720d99f8a76e538b8f9ffaa6201e35a08f02929ad39893681026440b38d8b2a96edad600e33976357b5393d3dcca4c9867e9b3702df91a85e03174c1312edf82300cd3f040d199e43b14df4bb07281ddbf9147b1e3fe30000007e5f0442e49b6783e1b7c47ec3cc538130535b4d78efe659b52233c6efe2b8a421a6112cb59d2797310a07ffe4baa895016913ee01d26f6b4affc9a22d0a0ed24fef5a9c1265a3e137de58efd5088e60880e3e1e3f7137c0cac03bdd8f4201005e099377c505054fb0440394829ef2166d0ac455df3b6b9f9ca91632b54f0d936f1c8be22bf0fe7df014e69c932a00d6f4c1618559507388255fd84ed9fd015d1b98a6fdf7b4e1e43ccd624f0c19486fd31772772981a08df022d4c87346010000";

#endif
6 changes: 4 additions & 2 deletions src/gtest/test_checktransaction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,11 @@ CMutableTransaction GetValidTransaction(int txVersion) {
csw_ccin.scId = GetRandHash();
std::vector<unsigned char> nullifierStr(CFieldElement::ByteSize(), 0x0);
GetRandBytes((unsigned char*)&nullifierStr[0], CFieldElement::ByteSize()-2);
csw_ccin.nullifier = CFieldElement{nullifierStr};
csw_ccin.nullifier.SetByteArray(nullifierStr);
GetRandBytes((unsigned char*)&csw_ccin.pubKeyHash, csw_ccin.pubKeyHash.size());
GetRandBytes((unsigned char*)&csw_ccin.scProof, csw_ccin.scProof.size());
std::vector<unsigned char> proofStr(CScProof::ByteSize(), 0x0);
GetRandBytes((unsigned char*)&proofStr[0], CScProof::ByteSize());
csw_ccin.scProof.SetByteArray(proofStr);
csw_ccin.redeemScript = CScript();
mtx.vcsw_ccin.push_back(csw_ccin);

Expand Down
Loading

0 comments on commit ab14627

Please sign in to comment.