aboutsummaryrefslogtreecommitdiff
path: root/src/test/policyestimator_tests.cpp
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2016-11-10 17:26:00 -0800
committerPieter Wuille <pieter.wuille@gmail.com>2016-11-19 17:51:09 -0800
commit1662b437b33b7ec5a1723f6ae6187d3bdd06f593 (patch)
tree00b734409ca0ff817c36c000deae676df3cf16e2 /src/test/policyestimator_tests.cpp
parentda60506fc80f6a78f1b271a9a53b956b49b37234 (diff)
downloadbitcoin-1662b437b33b7ec5a1723f6ae6187d3bdd06f593.tar.xz
Make CBlock::vtx a vector of shared_ptr<CTransaction>
Diffstat (limited to 'src/test/policyestimator_tests.cpp')
-rw-r--r--src/test/policyestimator_tests.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/test/policyestimator_tests.cpp b/src/test/policyestimator_tests.cpp
index 38aaaba267..08e5e774e1 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);
}
}