@ -559,15 +559,15 @@ BOOST_AUTO_TEST_CASE(MempoolSizeLimitTest)
// ... we should keep the same min fee until we get a block
pool . removeForBlock ( vtx , 1 ) ;
SetMockTime ( 42 + 2 * CTxMemPool : : ROLLING_FEE_HALFLIFE ) ;
BOOST_CHECK_EQUAL ( pool . GetMinFee ( 1 ) . GetFeePerK ( ) , ( maxFeeRateRemoved . GetFeePerK ( ) + 1000 ) / 2 ) ;
BOOST_CHECK_EQUAL ( pool . GetMinFee ( 1 ) . GetFeePerK ( ) , llround ( ( maxFeeRateRemoved . GetFeePerK ( ) + 1000 ) / 2.0 ) ) ;
// ... then feerate should drop 1/2 each halflife
SetMockTime ( 42 + 2 * CTxMemPool : : ROLLING_FEE_HALFLIFE + CTxMemPool : : ROLLING_FEE_HALFLIFE / 2 ) ;
BOOST_CHECK_EQUAL ( pool . GetMinFee ( pool . DynamicMemoryUsage ( ) * 5 / 2 ) . GetFeePerK ( ) , ( maxFeeRateRemoved . GetFeePerK ( ) + 1000 ) / 4 ) ;
BOOST_CHECK_EQUAL ( pool . GetMinFee ( pool . DynamicMemoryUsage ( ) * 5 / 2 ) . GetFeePerK ( ) , llround ( ( maxFeeRateRemoved . GetFeePerK ( ) + 1000 ) / 4.0 ) ) ;
// ... with a 1/2 halflife when mempool is < 1/2 its target size
SetMockTime ( 42 + 2 * CTxMemPool : : ROLLING_FEE_HALFLIFE + CTxMemPool : : ROLLING_FEE_HALFLIFE / 2 + CTxMemPool : : ROLLING_FEE_HALFLIFE / 4 ) ;
BOOST_CHECK_EQUAL ( pool . GetMinFee ( pool . DynamicMemoryUsage ( ) * 9 / 2 ) . GetFeePerK ( ) , ( maxFeeRateRemoved . GetFeePerK ( ) + 1000 ) / 8 ) ;
BOOST_CHECK_EQUAL ( pool . GetMinFee ( pool . DynamicMemoryUsage ( ) * 9 / 2 ) . GetFeePerK ( ) , llround ( ( maxFeeRateRemoved . GetFeePerK ( ) + 1000 ) / 8.0 ) ) ;
// ... with a 1/4 halflife when mempool is < 1/4 its target size
SetMockTime ( 42 + 7 * CTxMemPool : : ROLLING_FEE_HALFLIFE + CTxMemPool : : ROLLING_FEE_HALFLIFE / 2 + CTxMemPool : : ROLLING_FEE_HALFLIFE / 4 ) ;