mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 06:58:57 +01:00
Make removed and conflicted arguments optional to remove
This commit is contained in:
@@ -46,7 +46,6 @@ BOOST_AUTO_TEST_CASE(BlockPolicyEstimates)
|
||||
for (unsigned int i = 0; i < 128; i++)
|
||||
garbage.push_back('X');
|
||||
CMutableTransaction tx;
|
||||
std::list<CTransaction> dummyConflicted;
|
||||
tx.vin.resize(1);
|
||||
tx.vin[0].scriptSig = garbage;
|
||||
tx.vout.resize(1);
|
||||
@@ -81,7 +80,7 @@ BOOST_AUTO_TEST_CASE(BlockPolicyEstimates)
|
||||
txHashes[9-h].pop_back();
|
||||
}
|
||||
}
|
||||
mpool.removeForBlock(block, ++blocknum, dummyConflicted);
|
||||
mpool.removeForBlock(block, ++blocknum);
|
||||
block.clear();
|
||||
if (blocknum == 30) {
|
||||
// At this point we should need to combine 5 buckets to get enough data points
|
||||
@@ -125,7 +124,7 @@ BOOST_AUTO_TEST_CASE(BlockPolicyEstimates)
|
||||
// Mine 50 more blocks with no transactions happening, estimates shouldn't change
|
||||
// We haven't decayed the moving average enough so we still have enough data points in every bucket
|
||||
while (blocknum < 250)
|
||||
mpool.removeForBlock(block, ++blocknum, dummyConflicted);
|
||||
mpool.removeForBlock(block, ++blocknum);
|
||||
|
||||
for (int i = 1; i < 10;i++) {
|
||||
BOOST_CHECK(mpool.estimateFee(i).GetFeePerK() < origFeeEst[i-1] + deltaFee);
|
||||
@@ -146,7 +145,7 @@ BOOST_AUTO_TEST_CASE(BlockPolicyEstimates)
|
||||
txHashes[j].push_back(hash);
|
||||
}
|
||||
}
|
||||
mpool.removeForBlock(block, ++blocknum, dummyConflicted);
|
||||
mpool.removeForBlock(block, ++blocknum);
|
||||
}
|
||||
|
||||
int answerFound;
|
||||
@@ -167,7 +166,7 @@ BOOST_AUTO_TEST_CASE(BlockPolicyEstimates)
|
||||
txHashes[j].pop_back();
|
||||
}
|
||||
}
|
||||
mpool.removeForBlock(block, 265, dummyConflicted);
|
||||
mpool.removeForBlock(block, 265);
|
||||
block.clear();
|
||||
for (int i = 1; i < 10;i++) {
|
||||
BOOST_CHECK(mpool.estimateFee(i).GetFeePerK() > origFeeEst[i-1] - deltaFee);
|
||||
@@ -187,7 +186,7 @@ BOOST_AUTO_TEST_CASE(BlockPolicyEstimates)
|
||||
block.push_back(*ptx);
|
||||
}
|
||||
}
|
||||
mpool.removeForBlock(block, ++blocknum, dummyConflicted);
|
||||
mpool.removeForBlock(block, ++blocknum);
|
||||
block.clear();
|
||||
}
|
||||
for (int i = 1; i < 10; i++) {
|
||||
|
||||
Reference in New Issue
Block a user