diff options
author | Pieter Wuille <pieter.wuille@gmail.com> | 2016-11-10 17:34:17 -0800 |
---|---|---|
committer | Pieter Wuille <pieter.wuille@gmail.com> | 2016-11-19 17:53:23 -0800 |
commit | b4e4ba475a5679e09f279aaf2a83dcf93c632bdb (patch) | |
tree | 31f4d8edd5134e92bf133ee3dfd52651c14ed21e /src/test/policyestimator_tests.cpp | |
parent | 1662b437b33b7ec5a1723f6ae6187d3bdd06f593 (diff) | |
download | bitcoin-b4e4ba475a5679e09f279aaf2a83dcf93c632bdb.tar.xz |
Introduce convenience type CTransactionRef
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 08e5e774e1..7dc8f226c9 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<std::shared_ptr<const CTransaction>> block; + std::vector<CTransactionRef> block; int blocknum = 0; // Loop through 200 blocks @@ -66,7 +66,7 @@ BOOST_AUTO_TEST_CASE(BlockPolicyEstimates) // 9/10 blocks add 2nd highest and so on until ... // 1/10 blocks add lowest fee transactions while (txHashes[9-h].size()) { - std::shared_ptr<const CTransaction> ptx = mpool.get(txHashes[9-h].back()); + CTransactionRef ptx = mpool.get(txHashes[9-h].back()); if (ptx) block.push_back(ptx); txHashes[9-h].pop_back(); @@ -143,7 +143,7 @@ BOOST_AUTO_TEST_CASE(BlockPolicyEstimates) // Estimates should still not be below original for (int j = 0; j < 10; j++) { while(txHashes[j].size()) { - std::shared_ptr<const CTransaction> ptx = mpool.get(txHashes[j].back()); + CTransactionRef ptx = mpool.get(txHashes[j].back()); if (ptx) block.push_back(ptx); txHashes[j].pop_back(); @@ -163,7 +163,7 @@ BOOST_AUTO_TEST_CASE(BlockPolicyEstimates) tx.vin[0].prevout.n = 10000*blocknum+100*j+k; uint256 hash = tx.GetHash(); 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); + CTransactionRef ptx = mpool.get(hash); if (ptx) block.push_back(ptx); |