aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorAlex Morcos <morcos@chaincode.com>2017-03-09 15:26:05 -0500
committerAlex Morcos <morcos@chaincode.com>2017-05-10 11:45:27 -0400
commitc7447ec30348b338e77bc6429fbfac9f93549ef6 (patch)
treed29e992933923be972226b92b687cd081183e504 /src/test
parent4186d3fdfd319b568b520dd587be27bdff45c53d (diff)
downloadbitcoin-c7447ec30348b338e77bc6429fbfac9f93549ef6.tar.xz
Track failures in fee estimation.
Start tracking transactions which fail to confirm within the target and are then evicted or otherwise leave mempool. Fix slight error in unit test.
Diffstat (limited to 'src/test')
-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 942efce0f7..94de72ba47 100644
--- a/src/test/policyestimator_tests.cpp
+++ b/src/test/policyestimator_tests.cpp
@@ -159,16 +159,16 @@ BOOST_AUTO_TEST_CASE(BlockPolicyEstimates)
txHashes[j].pop_back();
}
}
- mpool.removeForBlock(block, 265);
+ mpool.removeForBlock(block, 266);
block.clear();
BOOST_CHECK(feeEst.estimateFee(1) == CFeeRate(0));
for (int i = 2; i < 10;i++) {
- BOOST_CHECK(feeEst.estimateFee(i).GetFeePerK() > origFeeEst[i-1] - deltaFee);
+ BOOST_CHECK(feeEst.estimateFee(i) == CFeeRate(0) || feeEst.estimateFee(i).GetFeePerK() > origFeeEst[i-1] - deltaFee);
}
- // Mine 200 more blocks where everything is mined every block
+ // Mine 400 more blocks where everything is mined every block
// Estimates should be below original estimates
- while (blocknum < 465) {
+ while (blocknum < 665) {
for (int j = 0; j < 10; j++) { // For each fee multiple
for (int k = 0; k < 4; k++) { // add 4 fee txs
tx.vin[0].prevout.n = 10000*blocknum+100*j+k;