aboutsummaryrefslogtreecommitdiff
path: root/src/test/policyestimator_tests.cpp
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2016-06-07 13:44:56 +0200
committerPieter Wuille <pieter.wuille@gmail.com>2016-06-07 13:44:56 +0200
commit288d85ddf2e0a0c9d25a23db56052883170466d0 (patch)
tree79da8673928fa0254b103a983b137136ea8de40c /src/test/policyestimator_tests.cpp
parentc2a4724642400bc9200aeef4c725b5c07eee9d90 (diff)
Get rid of CTxMempool::lookup() entirely
Diffstat (limited to 'src/test/policyestimator_tests.cpp')
-rw-r--r--src/test/policyestimator_tests.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/test/policyestimator_tests.cpp b/src/test/policyestimator_tests.cpp
index 644c3da213..2b00e6f567 100644
--- a/src/test/policyestimator_tests.cpp
+++ b/src/test/policyestimator_tests.cpp
@@ -74,9 +74,9 @@ BOOST_AUTO_TEST_CASE(BlockPolicyEstimates)
// 9/10 blocks add 2nd highest and so on until ...
// 1/10 blocks add lowest fee/pri transactions
while (txHashes[9-h].size()) {
- CTransaction btx;
- if (mpool.lookup(txHashes[9-h].back(), btx))
- block.push_back(btx);
+ std::shared_ptr<const CTransaction> ptx = mpool.get(txHashes[9-h].back());
+ if (ptx)
+ block.push_back(*ptx);
txHashes[9-h].pop_back();
}
}
@@ -160,9 +160,9 @@ BOOST_AUTO_TEST_CASE(BlockPolicyEstimates)
// Estimates should still not be below original
for (int j = 0; j < 10; j++) {
while(txHashes[j].size()) {
- CTransaction btx;
- if (mpool.lookup(txHashes[j].back(), btx))
- block.push_back(btx);
+ std::shared_ptr<const CTransaction> ptx = mpool.get(txHashes[j].back());
+ if (ptx)
+ block.push_back(*ptx);
txHashes[j].pop_back();
}
}
@@ -181,9 +181,9 @@ 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[k/4][j]).Time(GetTime()).Priority(priV[k/4][j]).Height(blocknum).FromTx(tx, &mpool));
- CTransaction btx;
- if (mpool.lookup(hash, btx))
- block.push_back(btx);
+ std::shared_ptr<const CTransaction> ptx = mpool.get(hash);
+ if (ptx)
+ block.push_back(*ptx);
}
}
mpool.removeForBlock(block, ++blocknum, dummyConflicted);