File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change 40
40
#include < test/util/coverage.h>
41
41
#include < test/util/net.h>
42
42
#include < test/util/random.h>
43
+ #include < test/util/transaction_utils.h>
43
44
#include < test/util/txmempool.h>
44
45
#include < txdb.h>
45
46
#include < txmempool.h>
@@ -586,6 +587,9 @@ void TestChain100Setup::MockMempoolMinFee(const CFeeRate& target_feerate)
586
587
CMutableTransaction mtx = CMutableTransaction ();
587
588
mtx.vin .emplace_back (COutPoint{Txid::FromUint256 (m_rng.rand256 ()), 0 });
588
589
mtx.vout .emplace_back (1 * COIN, GetScriptForDestination (WitnessV0ScriptHash (CScript () << OP_TRUE)));
590
+ // Set a large size so that the fee evaluated at target_feerate (which is usually in sats/kvB) is an integer.
591
+ // Otherwise, GetMinFee() may end up slightly different from target_feerate.
592
+ BulkTransaction (mtx, 4000 );
589
593
const auto tx{MakeTransactionRef (mtx)};
590
594
LockPoints lp;
591
595
// The new mempool min feerate is equal to the removed package's feerate + incremental feerate.
You can’t perform that action at this time.
0 commit comments