aboutsummaryrefslogtreecommitdiff
path: root/src/test/test_bitcoin.h
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2017-10-03 14:26:05 +0200
committerMarcoFalke <falke.marco@gmail.com>2017-10-03 14:27:39 +0200
commitdbc4ae03963014ab4b7957d62ba59dbd8f938c33 (patch)
tree7c4c47e709e79de764954456cbbdf1e7b6c2c8aa /src/test/test_bitcoin.h
parent8ddf60db7ad636b6a31b590251c671ded635fa1d (diff)
parent46ce223d15d4111d096f6342eb6f526d2507d7d7 (diff)
Merge #11293: Deduplicate CMerkleBlock construction code, add test coverage
46ce223d1 Add tests for CMerkleBlock usage with txids specified (James O'Beirne) 5ab586f90 Consolidate CMerkleBlock constructor into a single method (James O'Beirne) Pull request description: What started as a simple task to add test coverage ended up giving way to a light refactoring. This consolidates the mostly-identical `CMerkleBlock` constructors into one (using C++11 constructor delegation) and adds coverage for the by-txids construction case. ### Before ![selection_006](https://user-images.githubusercontent.com/73197/30242104-0f381fe4-9545-11e7-9617-83b87fce0456.png) ### After ![selection_008](https://user-images.githubusercontent.com/73197/30242107-1425dfaa-9545-11e7-9e6b-2c3432517dd1.png) Tree-SHA512: eed84ed3e8bfc43473077b575c8252759a857e37275e4b36ca7cc2c17a65895e5f494bfd9d4aeab09fc6e98fc6a9c641ac7ecc0ddbeefe01a9e4308e7909e529
Diffstat (limited to 'src/test/test_bitcoin.h')
-rw-r--r--src/test/test_bitcoin.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/test/test_bitcoin.h b/src/test/test_bitcoin.h
index 6ada96f887..2390aca342 100644
--- a/src/test/test_bitcoin.h
+++ b/src/test/test_bitcoin.h
@@ -99,7 +99,7 @@ struct TestMemPoolEntryHelper
TestMemPoolEntryHelper() :
nFee(0), nTime(0), nHeight(1),
spendsCoinbase(false), sigOpCost(4) { }
-
+
CTxMemPoolEntry FromTx(const CMutableTransaction &tx);
CTxMemPoolEntry FromTx(const CTransaction &tx);
@@ -110,4 +110,7 @@ struct TestMemPoolEntryHelper
TestMemPoolEntryHelper &SpendsCoinbase(bool _flag) { spendsCoinbase = _flag; return *this; }
TestMemPoolEntryHelper &SigOpsCost(unsigned int _sigopsCost) { sigOpCost = _sigopsCost; return *this; }
};
+
+CBlock getBlock13b8a();
+
#endif