diff options
| author | Pieter Wuille <[email protected]> | 2016-11-10 17:26:00 -0800 |
|---|---|---|
| committer | Pieter Wuille <[email protected]> | 2016-11-19 17:51:09 -0800 |
| commit | 1662b437b33b7ec5a1723f6ae6187d3bdd06f593 (patch) | |
| tree | 00b734409ca0ff817c36c000deae676df3cf16e2 /src/test/policyestimator_tests.cpp | |
| parent | Add deserializing constructors to CTransaction and CMutableTransaction (diff) | |
| download | discoin-1662b437b33b7ec5a1723f6ae6187d3bdd06f593.tar.xz discoin-1662b437b33b7ec5a1723f6ae6187d3bdd06f593.zip | |
Make CBlock::vtx a vector of shared_ptr<CTransaction>
Diffstat (limited to 'src/test/policyestimator_tests.cpp')
| -rw-r--r-- | src/test/policyestimator_tests.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/test/policyestimator_tests.cpp b/src/test/policyestimator_tests.cpp index 38aaaba26..08e5e774e 100644 --- a/src/test/policyestimator_tests.cpp +++ b/src/test/policyestimator_tests.cpp @@ -45,7 +45,7 @@ BOOST_AUTO_TEST_CASE(BlockPolicyEstimates) CFeeRate baseRate(basefee, GetVirtualTransactionSize(tx)); // Create a fake block - std::vector<CTransaction> block; + std::vector<std::shared_ptr<const CTransaction>> block; int blocknum = 0; // Loop through 200 blocks @@ -68,7 +68,7 @@ BOOST_AUTO_TEST_CASE(BlockPolicyEstimates) while (txHashes[9-h].size()) { std::shared_ptr<const CTransaction> ptx = mpool.get(txHashes[9-h].back()); if (ptx) - block.push_back(*ptx); + block.push_back(ptx); txHashes[9-h].pop_back(); } } @@ -145,7 +145,7 @@ BOOST_AUTO_TEST_CASE(BlockPolicyEstimates) while(txHashes[j].size()) { std::shared_ptr<const CTransaction> ptx = mpool.get(txHashes[j].back()); if (ptx) - block.push_back(*ptx); + block.push_back(ptx); txHashes[j].pop_back(); } } @@ -165,7 +165,7 @@ BOOST_AUTO_TEST_CASE(BlockPolicyEstimates) mpool.addUnchecked(hash, entry.Fee(feeV[j]).Time(GetTime()).Priority(0).Height(blocknum).FromTx(tx, &mpool)); std::shared_ptr<const CTransaction> ptx = mpool.get(hash); if (ptx) - block.push_back(*ptx); + block.push_back(ptx); } } |