mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 14:38:29 +01:00
Introduce convenience type CTransactionRef
This commit is contained in:
@@ -55,7 +55,7 @@ BOOST_AUTO_TEST_CASE(MempoolRemoveTest)
|
||||
|
||||
|
||||
CTxMemPool testPool(CFeeRate(0));
|
||||
std::vector<std::shared_ptr<const CTransaction>> removed;
|
||||
std::vector<CTransactionRef> removed;
|
||||
|
||||
// Nothing in pool, remove should do nothing:
|
||||
testPool.removeRecursive(txParent, &removed);
|
||||
@@ -410,8 +410,8 @@ BOOST_AUTO_TEST_CASE(MempoolAncestorIndexingTest)
|
||||
CheckSort<ancestor_score>(pool, sortedOrder);
|
||||
|
||||
/* after tx6 is mined, tx7 should move up in the sort */
|
||||
std::vector<std::shared_ptr<const CTransaction>> vtx;
|
||||
vtx.push_back(std::make_shared<const CTransaction>(tx6));
|
||||
std::vector<CTransactionRef> vtx;
|
||||
vtx.push_back(MakeTransactionRef(tx6));
|
||||
pool.removeForBlock(vtx, 1, NULL, false);
|
||||
|
||||
sortedOrder.erase(sortedOrder.begin()+1);
|
||||
@@ -546,7 +546,7 @@ BOOST_AUTO_TEST_CASE(MempoolSizeLimitTest)
|
||||
pool.addUnchecked(tx5.GetHash(), entry.Fee(1000LL).FromTx(tx5, &pool));
|
||||
pool.addUnchecked(tx7.GetHash(), entry.Fee(9000LL).FromTx(tx7, &pool));
|
||||
|
||||
std::vector<std::shared_ptr<const CTransaction>> vtx;
|
||||
std::vector<CTransactionRef> vtx;
|
||||
SetMockTime(42);
|
||||
SetMockTime(42 + CTxMemPool::ROLLING_FEE_HALFLIFE);
|
||||
BOOST_CHECK_EQUAL(pool.GetMinFee(1).GetFeePerK(), maxFeeRateRemoved.GetFeePerK() + 1000);
|
||||
|
||||
Reference in New Issue
Block a user