aboutsummaryrefslogtreecommitdiff
path: root/src/test/policyestimator_tests.cpp
diff options
context:
space:
mode:
authorAlex Morcos <[email protected]>2015-11-13 10:05:21 -0500
committerAlex Morcos <[email protected]>2015-11-19 21:44:35 -0500
commitc0353064ddf71ad103bd19f6e7c10ff8e240ac46 (patch)
tree9fec6d8c6ddb79925d90b2d12582e2dee3380de6 /src/test/policyestimator_tests.cpp
parentModify variable names for entry height and priority (diff)
downloaddiscoin-c0353064ddf71ad103bd19f6e7c10ff8e240ac46.tar.xz
discoin-c0353064ddf71ad103bd19f6e7c10ff8e240ac46.zip
Change GetPriority calculation.
Compute the value of inputs that already are in the chain at time of mempool entry and only increase priority due to aging for those inputs. This effectively changes the CTxMemPoolEntry's GetPriority calculation from an upper bound to a lower bound.
Diffstat (limited to 'src/test/policyestimator_tests.cpp')
-rw-r--r--src/test/policyestimator_tests.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/test/policyestimator_tests.cpp b/src/test/policyestimator_tests.cpp
index 1315146f1..644c3da21 100644
--- a/src/test/policyestimator_tests.cpp
+++ b/src/test/policyestimator_tests.cpp
@@ -196,7 +196,7 @@ BOOST_AUTO_TEST_CASE(BlockPolicyEstimates)
// Test that if the mempool is limited, estimateSmartFee won't return a value below the mempool min fee
// and that estimateSmartPriority returns essentially an infinite value
- mpool.addUnchecked(tx.GetHash(), CTxMemPoolEntry(tx, feeV[0][5], GetTime(), priV[1][5], blocknum, mpool.HasNoInputsOf(tx)));
+ mpool.addUnchecked(tx.GetHash(), entry.Fee(feeV[0][5]).Time(GetTime()).Priority(priV[1][5]).Height(blocknum).FromTx(tx, &mpool));
// evict that transaction which should set a mempool min fee of minRelayTxFee + feeV[0][5]
mpool.TrimToSize(1);
BOOST_CHECK(mpool.GetMinFee(1).GetFeePerK() > feeV[0][5]);