Changeset View
Changeset View
Standalone View
Standalone View
src/test/policyestimator_tests.cpp
Show First 20 Lines • Show All 163 Lines • ▼ Show 20 Lines | while (blocknum < 265) { | ||||
mpool.removeForBlock(block, ++blocknum); | mpool.removeForBlock(block, ++blocknum); | ||||
} | } | ||||
int answerFound; | int answerFound; | ||||
for (int i = 1; i < 10; i++) { | for (int i = 1; i < 10; i++) { | ||||
BOOST_CHECK(mpool.estimateFee(i) == CFeeRate(0) || | BOOST_CHECK(mpool.estimateFee(i) == CFeeRate(0) || | ||||
mpool.estimateFee(i).GetFeePerK() > | mpool.estimateFee(i).GetFeePerK() > | ||||
origFeeEst[i - 1] - deltaFee); | origFeeEst[i - 1] - deltaFee); | ||||
BOOST_CHECK(mpool.estimateSmartFee(i, &answerFound).GetFeePerK() > | Amount a1 = mpool.estimateSmartFee(i, &answerFound).GetFeePerK(); | ||||
origFeeEst[answerFound - 1] - deltaFee); | Amount a2 = origFeeEst[answerFound - 1] - deltaFee; | ||||
BOOST_CHECK(a1 > a2); | |||||
} | } | ||||
// Mine all those transactions | // Mine all those transactions | ||||
// Estimates should still not be below original | // Estimates should still not be below original | ||||
for (int j = 0; j < 10; j++) { | for (int j = 0; j < 10; j++) { | ||||
while (txHashes[j].size()) { | while (txHashes[j].size()) { | ||||
CTransactionRef ptx = mpool.get(txHashes[j].back()); | CTransactionRef ptx = mpool.get(txHashes[j].back()); | ||||
if (ptx) block.push_back(ptx); | if (ptx) block.push_back(ptx); | ||||
▲ Show 20 Lines • Show All 59 Lines • Show Last 20 Lines |