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 4040#include < test/util/coverage.h>
4141#include < test/util/net.h>
4242#include < test/util/random.h>
43+ #include < test/util/transaction_utils.h>
4344#include < test/util/txmempool.h>
4445#include < txdb.h>
4546#include < txmempool.h>
@@ -586,6 +587,9 @@ void TestChain100Setup::MockMempoolMinFee(const CFeeRate& target_feerate)
586587 CMutableTransaction mtx = CMutableTransaction ();
587588 mtx.vin .emplace_back (COutPoint{Txid::FromUint256 (m_rng.rand256 ()), 0 });
588589 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 );
589593 const auto tx{MakeTransactionRef (mtx)};
590594 LockPoints lp;
591595 // 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