Skip to content

Commit f5fc319

Browse files
committed
Merge bitcoin/bitcoin#29086: refactor: Simply include CTxMemPool::Options in CTxMemPool directly rather than duplicating definition
cc67d33 refactor: Simply include CTxMemPool::Options in CTxMemPool directly rather than duplicating definition (Luke Dashjr) Pull request description: Instead of duplicating mempool options two places, just include the Options struct directly on the CTxMemPool ACKs for top commit: achow101: ACK cc67d33 kristapsk: cr utACK cc67d33 jonatack: ACK cc67d33 Tree-SHA512: 9deb5ea6f85eeb1c7e04536cded65303b0ec459936a97e4f257aff2c50b0984a4ddbf69a4651f48455b9c80200a1fd24e9c74926874fdd9be436bbbe406251ce
2 parents dbb3113 + cc67d33 commit f5fc319

File tree

11 files changed

+66
-92
lines changed

11 files changed

+66
-92
lines changed

src/kernel/mempool_persist.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ bool LoadMempool(CTxMemPool& pool, const fs::path& load_path, Chainstate& active
9696
if (amountdelta && opts.apply_fee_delta_priority) {
9797
pool.PrioritiseTransaction(tx->GetHash(), amountdelta);
9898
}
99-
if (nTime > TicksSinceEpoch<std::chrono::seconds>(now - pool.m_expiry)) {
99+
if (nTime > TicksSinceEpoch<std::chrono::seconds>(now - pool.m_opts.expiry)) {
100100
LOCK(cs_main);
101101
const auto& accepted = AcceptToMemoryPool(active_chainstate, tx, nTime, /*bypass_limits=*/false, /*test_accept=*/false);
102102
if (accepted.m_result_type == MempoolAcceptResult::ResultType::VALID) {
@@ -174,11 +174,11 @@ bool DumpMempool(const CTxMemPool& pool, const fs::path& dump_path, FopenFn mock
174174
}
175175

176176
try {
177-
const uint64_t version{pool.m_persist_v1_dat ? MEMPOOL_DUMP_VERSION_NO_XOR_KEY : MEMPOOL_DUMP_VERSION};
177+
const uint64_t version{pool.m_opts.persist_v1_dat ? MEMPOOL_DUMP_VERSION_NO_XOR_KEY : MEMPOOL_DUMP_VERSION};
178178
file << version;
179179

180180
std::vector<std::byte> xor_key(8);
181-
if (!pool.m_persist_v1_dat) {
181+
if (!pool.m_opts.persist_v1_dat) {
182182
FastRandomContext{}.fillrand(xor_key);
183183
file << xor_key;
184184
}

src/net_processing.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5775,7 +5775,7 @@ void PeerManagerImpl::MaybeSendFeefilter(CNode& pto, Peer& peer, std::chrono::mi
57755775
if (current_time > peer.m_next_send_feefilter) {
57765776
CAmount filterToSend = m_fee_filter_rounder.round(currentFilter);
57775777
// We always have a fee filter of at least the min relay fee
5778-
filterToSend = std::max(filterToSend, m_mempool.m_min_relay_feerate.GetFeePerK());
5778+
filterToSend = std::max(filterToSend, m_mempool.m_opts.min_relay_feerate.GetFeePerK());
57795779
if (filterToSend != peer.m_fee_filter_sent) {
57805780
MakeAndPushMessage(pto, NetMsgType::FEEFILTER, filterToSend);
57815781
peer.m_fee_filter_sent = filterToSend;

src/node/interfaces.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ class NodeImpl : public Node
318318
CFeeRate getDustRelayFee() override
319319
{
320320
if (!m_context->mempool) return CFeeRate{DUST_RELAY_TX_FEE};
321-
return m_context->mempool->m_dust_relay_feerate;
321+
return m_context->mempool->m_opts.dust_relay_feerate;
322322
}
323323
UniValue executeRpc(const std::string& command, const UniValue& params, const std::string& uri) override
324324
{
@@ -701,7 +701,7 @@ class ChainImpl : public Chain
701701
{
702702
const CTxMemPool::Limits default_limits{};
703703

704-
const CTxMemPool::Limits& limits{m_node.mempool ? m_node.mempool->m_limits : default_limits};
704+
const CTxMemPool::Limits& limits{m_node.mempool ? m_node.mempool->m_opts.limits : default_limits};
705705

706706
limit_ancestor_count = limits.ancestor_count;
707707
limit_descendant_count = limits.descendant_count;
@@ -732,17 +732,17 @@ class ChainImpl : public Chain
732732
CFeeRate relayMinFee() override
733733
{
734734
if (!m_node.mempool) return CFeeRate{DEFAULT_MIN_RELAY_TX_FEE};
735-
return m_node.mempool->m_min_relay_feerate;
735+
return m_node.mempool->m_opts.min_relay_feerate;
736736
}
737737
CFeeRate relayIncrementalFee() override
738738
{
739739
if (!m_node.mempool) return CFeeRate{DEFAULT_INCREMENTAL_RELAY_FEE};
740-
return m_node.mempool->m_incremental_relay_feerate;
740+
return m_node.mempool->m_opts.incremental_relay_feerate;
741741
}
742742
CFeeRate relayDustFee() override
743743
{
744744
if (!m_node.mempool) return CFeeRate{DUST_RELAY_TX_FEE};
745-
return m_node.mempool->m_dust_relay_feerate;
745+
return m_node.mempool->m_opts.dust_relay_feerate;
746746
}
747747
bool havePruned() override
748748
{

src/rpc/fees.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ static RPCHelpMan estimatesmartfee()
6565
const NodeContext& node = EnsureAnyNodeContext(request.context);
6666
const CTxMemPool& mempool = EnsureMemPool(node);
6767

68-
CHECK_NONFATAL(mempool.m_signals)->SyncWithValidationInterfaceQueue();
68+
CHECK_NONFATAL(mempool.m_opts.signals)->SyncWithValidationInterfaceQueue();
6969
unsigned int max_target = fee_estimator.HighestTargetTracked(FeeEstimateHorizon::LONG_HALFLIFE);
7070
unsigned int conf_target = ParseConfirmTarget(request.params[0], max_target);
7171
bool conservative = true;
@@ -83,7 +83,7 @@ static RPCHelpMan estimatesmartfee()
8383
CFeeRate feeRate{fee_estimator.estimateSmartFee(conf_target, &feeCalc, conservative)};
8484
if (feeRate != CFeeRate(0)) {
8585
CFeeRate min_mempool_feerate{mempool.GetMinFee()};
86-
CFeeRate min_relay_feerate{mempool.m_min_relay_feerate};
86+
CFeeRate min_relay_feerate{mempool.m_opts.min_relay_feerate};
8787
feeRate = std::max({feeRate, min_mempool_feerate, min_relay_feerate});
8888
result.pushKV("feerate", ValueFromAmount(feeRate.GetFeePerK()));
8989
} else {

src/rpc/mempool.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -671,12 +671,12 @@ UniValue MempoolInfoToJSON(const CTxMemPool& pool)
671671
ret.pushKV("bytes", (int64_t)pool.GetTotalTxSize());
672672
ret.pushKV("usage", (int64_t)pool.DynamicMemoryUsage());
673673
ret.pushKV("total_fee", ValueFromAmount(pool.GetTotalFee()));
674-
ret.pushKV("maxmempool", pool.m_max_size_bytes);
675-
ret.pushKV("mempoolminfee", ValueFromAmount(std::max(pool.GetMinFee(), pool.m_min_relay_feerate).GetFeePerK()));
676-
ret.pushKV("minrelaytxfee", ValueFromAmount(pool.m_min_relay_feerate.GetFeePerK()));
677-
ret.pushKV("incrementalrelayfee", ValueFromAmount(pool.m_incremental_relay_feerate.GetFeePerK()));
674+
ret.pushKV("maxmempool", pool.m_opts.max_size_bytes);
675+
ret.pushKV("mempoolminfee", ValueFromAmount(std::max(pool.GetMinFee(), pool.m_opts.min_relay_feerate).GetFeePerK()));
676+
ret.pushKV("minrelaytxfee", ValueFromAmount(pool.m_opts.min_relay_feerate.GetFeePerK()));
677+
ret.pushKV("incrementalrelayfee", ValueFromAmount(pool.m_opts.incremental_relay_feerate.GetFeePerK()));
678678
ret.pushKV("unbroadcastcount", uint64_t{pool.GetUnbroadcastTxs().size()});
679-
ret.pushKV("fullrbf", pool.m_full_rbf);
679+
ret.pushKV("fullrbf", pool.m_opts.full_rbf);
680680
return ret;
681681
}
682682

src/rpc/net.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -697,8 +697,8 @@ static RPCHelpMan getnetworkinfo()
697697
obj.pushKV("networks", GetNetworksInfo());
698698
if (node.mempool) {
699699
// Those fields can be deprecated, to be replaced by the getmempoolinfo fields
700-
obj.pushKV("relayfee", ValueFromAmount(node.mempool->m_min_relay_feerate.GetFeePerK()));
701-
obj.pushKV("incrementalfee", ValueFromAmount(node.mempool->m_incremental_relay_feerate.GetFeePerK()));
700+
obj.pushKV("relayfee", ValueFromAmount(node.mempool->m_opts.min_relay_feerate.GetFeePerK()));
701+
obj.pushKV("incrementalfee", ValueFromAmount(node.mempool->m_opts.incremental_relay_feerate.GetFeePerK()));
702702
}
703703
UniValue localAddresses(UniValue::VARR);
704704
{

src/test/txpackage_tests.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -679,7 +679,7 @@ BOOST_FIXTURE_TEST_CASE(package_witness_swap_tests, TestChain100Setup)
679679
CTransactionRef ptx_parent3 = MakeTransactionRef(mtx_parent3);
680680
package_mixed.push_back(ptx_parent3);
681681
BOOST_CHECK(m_node.mempool->GetMinFee().GetFee(GetVirtualTransactionSize(*ptx_parent3)) > low_fee_amt);
682-
BOOST_CHECK(m_node.mempool->m_min_relay_feerate.GetFee(GetVirtualTransactionSize(*ptx_parent3)) <= low_fee_amt);
682+
BOOST_CHECK(m_node.mempool->m_opts.min_relay_feerate.GetFee(GetVirtualTransactionSize(*ptx_parent3)) <= low_fee_amt);
683683

684684
// child spends parent1, parent2, and parent3
685685
CKey mixed_grandchild_key = GenerateRandomKey();
@@ -825,7 +825,7 @@ BOOST_FIXTURE_TEST_CASE(package_cpfp_tests, TestChain100Setup)
825825
CTransactionRef tx_parent_cheap = MakeTransactionRef(mtx_parent_cheap);
826826
package_still_too_low.push_back(tx_parent_cheap);
827827
BOOST_CHECK(m_node.mempool->GetMinFee().GetFee(GetVirtualTransactionSize(*tx_parent_cheap)) > parent_fee);
828-
BOOST_CHECK(m_node.mempool->m_min_relay_feerate.GetFee(GetVirtualTransactionSize(*tx_parent_cheap)) <= parent_fee);
828+
BOOST_CHECK(m_node.mempool->m_opts.min_relay_feerate.GetFee(GetVirtualTransactionSize(*tx_parent_cheap)) <= parent_fee);
829829

830830
auto mtx_child_cheap = CreateValidMempoolTransaction(/*input_transaction=*/tx_parent_cheap, /*input_vout=*/0,
831831
/*input_height=*/101, /*input_signing_key=*/child_key,

src/test/util/setup_common.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -552,9 +552,9 @@ void TestChain100Setup::MockMempoolMinFee(const CFeeRate& target_feerate)
552552
assert(m_node.mempool->size() == 0);
553553
// The target feerate cannot be too low...
554554
// ...otherwise the transaction's feerate will need to be negative.
555-
assert(target_feerate > m_node.mempool->m_incremental_relay_feerate);
555+
assert(target_feerate > m_node.mempool->m_opts.incremental_relay_feerate);
556556
// ...otherwise this is not meaningful. The feerate policy uses the maximum of both feerates.
557-
assert(target_feerate > m_node.mempool->m_min_relay_feerate);
557+
assert(target_feerate > m_node.mempool->m_opts.min_relay_feerate);
558558

559559
// Manually create an invalid transaction. Manually set the fee in the CTxMemPoolEntry to
560560
// achieve the exact target feerate.
@@ -565,7 +565,7 @@ void TestChain100Setup::MockMempoolMinFee(const CFeeRate& target_feerate)
565565
LockPoints lp;
566566
// The new mempool min feerate is equal to the removed package's feerate + incremental feerate.
567567
const auto tx_fee = target_feerate.GetFee(GetVirtualTransactionSize(*tx)) -
568-
m_node.mempool->m_incremental_relay_feerate.GetFee(GetVirtualTransactionSize(*tx));
568+
m_node.mempool->m_opts.incremental_relay_feerate.GetFee(GetVirtualTransactionSize(*tx));
569569
m_node.mempool->addUnchecked(CTxMemPoolEntry(tx, /*fee=*/tx_fee,
570570
/*time=*/0, /*entry_height=*/1, /*entry_sequence=*/0,
571571
/*spends_coinbase=*/true, /*sigops_cost=*/1, lp));

src/txmempool.cpp

Lines changed: 22 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ void CTxMemPool::UpdateForDescendants(txiter updateIt, cacheMap& cachedDescendan
9292
// Don't directly remove the transaction here -- doing so would
9393
// invalidate iterators in cachedDescendants. Mark it for removal
9494
// by inserting into descendants_to_remove.
95-
if (descendant.GetCountWithAncestors() > uint64_t(m_limits.ancestor_count) || descendant.GetSizeWithAncestors() > m_limits.ancestor_size_vbytes) {
95+
if (descendant.GetCountWithAncestors() > uint64_t(m_opts.limits.ancestor_count) || descendant.GetSizeWithAncestors() > m_opts.limits.ancestor_size_vbytes) {
9696
descendants_to_remove.insert(descendant.GetTx().GetHash());
9797
}
9898
}
@@ -203,14 +203,14 @@ util::Result<void> CTxMemPool::CheckPackageLimits(const Package& package,
203203
size_t pack_count = package.size();
204204

205205
// Package itself is busting mempool limits; should be rejected even if no staged_ancestors exist
206-
if (pack_count > static_cast<uint64_t>(m_limits.ancestor_count)) {
207-
return util::Error{Untranslated(strprintf("package count %u exceeds ancestor count limit [limit: %u]", pack_count, m_limits.ancestor_count))};
208-
} else if (pack_count > static_cast<uint64_t>(m_limits.descendant_count)) {
209-
return util::Error{Untranslated(strprintf("package count %u exceeds descendant count limit [limit: %u]", pack_count, m_limits.descendant_count))};
210-
} else if (total_vsize > m_limits.ancestor_size_vbytes) {
211-
return util::Error{Untranslated(strprintf("package size %u exceeds ancestor size limit [limit: %u]", total_vsize, m_limits.ancestor_size_vbytes))};
212-
} else if (total_vsize > m_limits.descendant_size_vbytes) {
213-
return util::Error{Untranslated(strprintf("package size %u exceeds descendant size limit [limit: %u]", total_vsize, m_limits.descendant_size_vbytes))};
206+
if (pack_count > static_cast<uint64_t>(m_opts.limits.ancestor_count)) {
207+
return util::Error{Untranslated(strprintf("package count %u exceeds ancestor count limit [limit: %u]", pack_count, m_opts.limits.ancestor_count))};
208+
} else if (pack_count > static_cast<uint64_t>(m_opts.limits.descendant_count)) {
209+
return util::Error{Untranslated(strprintf("package count %u exceeds descendant count limit [limit: %u]", pack_count, m_opts.limits.descendant_count))};
210+
} else if (total_vsize > m_opts.limits.ancestor_size_vbytes) {
211+
return util::Error{Untranslated(strprintf("package size %u exceeds ancestor size limit [limit: %u]", total_vsize, m_opts.limits.ancestor_size_vbytes))};
212+
} else if (total_vsize > m_opts.limits.descendant_size_vbytes) {
213+
return util::Error{Untranslated(strprintf("package size %u exceeds descendant size limit [limit: %u]", total_vsize, m_opts.limits.descendant_size_vbytes))};
214214
}
215215

216216
CTxMemPoolEntry::Parents staged_ancestors;
@@ -219,8 +219,8 @@ util::Result<void> CTxMemPool::CheckPackageLimits(const Package& package,
219219
std::optional<txiter> piter = GetIter(input.prevout.hash);
220220
if (piter) {
221221
staged_ancestors.insert(**piter);
222-
if (staged_ancestors.size() + package.size() > static_cast<uint64_t>(m_limits.ancestor_count)) {
223-
return util::Error{Untranslated(strprintf("too many unconfirmed parents [limit: %u]", m_limits.ancestor_count))};
222+
if (staged_ancestors.size() + package.size() > static_cast<uint64_t>(m_opts.limits.ancestor_count)) {
223+
return util::Error{Untranslated(strprintf("too many unconfirmed parents [limit: %u]", m_opts.limits.ancestor_count))};
224224
}
225225
}
226226
}
@@ -229,7 +229,7 @@ util::Result<void> CTxMemPool::CheckPackageLimits(const Package& package,
229229
// considered together must be within limits even if they are not interdependent. This may be
230230
// stricter than the limits for each individual transaction.
231231
const auto ancestors{CalculateAncestorsAndCheckLimits(total_vsize, package.size(),
232-
staged_ancestors, m_limits)};
232+
staged_ancestors, m_opts.limits)};
233233
// It's possible to overestimate the ancestor/descendant totals.
234234
if (!ancestors.has_value()) return util::Error{Untranslated("possibly " + util::ErrorString(ancestors).original)};
235235
return {};
@@ -396,19 +396,7 @@ void CTxMemPoolEntry::UpdateAncestorState(int32_t modifySize, CAmount modifyFee,
396396
}
397397

398398
CTxMemPool::CTxMemPool(const Options& opts)
399-
: m_check_ratio{opts.check_ratio},
400-
m_max_size_bytes{opts.max_size_bytes},
401-
m_expiry{opts.expiry},
402-
m_incremental_relay_feerate{opts.incremental_relay_feerate},
403-
m_min_relay_feerate{opts.min_relay_feerate},
404-
m_dust_relay_feerate{opts.dust_relay_feerate},
405-
m_permit_bare_multisig{opts.permit_bare_multisig},
406-
m_max_datacarrier_bytes{opts.max_datacarrier_bytes},
407-
m_require_standard{opts.require_standard},
408-
m_full_rbf{opts.full_rbf},
409-
m_persist_v1_dat{opts.persist_v1_dat},
410-
m_limits{opts.limits},
411-
m_signals{opts.signals}
399+
: m_opts{opts}
412400
{
413401
}
414402

@@ -489,12 +477,12 @@ void CTxMemPool::removeUnchecked(txiter it, MemPoolRemovalReason reason)
489477
// even if not directly reported below.
490478
uint64_t mempool_sequence = GetAndIncrementSequence();
491479

492-
if (reason != MemPoolRemovalReason::BLOCK && m_signals) {
480+
if (reason != MemPoolRemovalReason::BLOCK && m_opts.signals) {
493481
// Notify clients that a transaction has been removed from the mempool
494482
// for any reason except being included in a block. Clients interested
495483
// in transactions included in blocks can subscribe to the BlockConnected
496484
// notification.
497-
m_signals->TransactionRemovedFromMempool(it->GetSharedTx(), reason, mempool_sequence);
485+
m_opts.signals->TransactionRemovedFromMempool(it->GetSharedTx(), reason, mempool_sequence);
498486
}
499487
TRACE5(mempool, removed,
500488
it->GetTx().GetHash().data(),
@@ -645,18 +633,18 @@ void CTxMemPool::removeForBlock(const std::vector<CTransactionRef>& vtx, unsigne
645633
removeConflicts(*tx);
646634
ClearPrioritisation(tx->GetHash());
647635
}
648-
if (m_signals) {
649-
m_signals->MempoolTransactionsRemovedForBlock(txs_removed_for_block, nBlockHeight);
636+
if (m_opts.signals) {
637+
m_opts.signals->MempoolTransactionsRemovedForBlock(txs_removed_for_block, nBlockHeight);
650638
}
651639
lastRollingFeeUpdate = GetTime();
652640
blockSinceLastRollingFeeBump = true;
653641
}
654642

655643
void CTxMemPool::check(const CCoinsViewCache& active_coins_tip, int64_t spendheight) const
656644
{
657-
if (m_check_ratio == 0) return;
645+
if (m_opts.check_ratio == 0) return;
658646

659-
if (GetRand(m_check_ratio) >= 1) return;
647+
if (GetRand(m_opts.check_ratio) >= 1) return;
660648

661649
AssertLockHeld(::cs_main);
662650
LOCK(cs);
@@ -1108,12 +1096,12 @@ CFeeRate CTxMemPool::GetMinFee(size_t sizelimit) const {
11081096
rollingMinimumFeeRate = rollingMinimumFeeRate / pow(2.0, (time - lastRollingFeeUpdate) / halflife);
11091097
lastRollingFeeUpdate = time;
11101098

1111-
if (rollingMinimumFeeRate < (double)m_incremental_relay_feerate.GetFeePerK() / 2) {
1099+
if (rollingMinimumFeeRate < (double)m_opts.incremental_relay_feerate.GetFeePerK() / 2) {
11121100
rollingMinimumFeeRate = 0;
11131101
return CFeeRate(0);
11141102
}
11151103
}
1116-
return std::max(CFeeRate(llround(rollingMinimumFeeRate)), m_incremental_relay_feerate);
1104+
return std::max(CFeeRate(llround(rollingMinimumFeeRate)), m_opts.incremental_relay_feerate);
11171105
}
11181106

11191107
void CTxMemPool::trackPackageRemoved(const CFeeRate& rate) {
@@ -1137,7 +1125,7 @@ void CTxMemPool::TrimToSize(size_t sizelimit, std::vector<COutPoint>* pvNoSpends
11371125
// to have 0 fee). This way, we don't allow txn to enter mempool with feerate
11381126
// equal to txn which were removed with no block in between.
11391127
CFeeRate removed(it->GetModFeesWithDescendants(), it->GetSizeWithDescendants());
1140-
removed += m_incremental_relay_feerate;
1128+
removed += m_opts.incremental_relay_feerate;
11411129
trackPackageRemoved(removed);
11421130
maxFeeRateRemoved = std::max(maxFeeRateRemoved, removed);
11431131

src/txmempool.h

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,6 @@ struct TxMempoolInfo
301301
class CTxMemPool
302302
{
303303
protected:
304-
const int m_check_ratio; //!< Value n means that 1 times in n we check.
305304
std::atomic<unsigned int> nTransactionsUpdated{0}; //!< Used by getblocktemplate to trigger CreateNewBlock() invocation
306305

307306
uint64_t totalTxSize GUARDED_BY(cs){0}; //!< sum of all mempool tx's virtual sizes. Differs from serialized tx size since witness data is discounted. Defined in BIP 141.
@@ -436,20 +435,7 @@ class CTxMemPool
436435

437436
using Options = kernel::MemPoolOptions;
438437

439-
const int64_t m_max_size_bytes;
440-
const std::chrono::seconds m_expiry;
441-
const CFeeRate m_incremental_relay_feerate;
442-
const CFeeRate m_min_relay_feerate;
443-
const CFeeRate m_dust_relay_feerate;
444-
const bool m_permit_bare_multisig;
445-
const std::optional<unsigned> m_max_datacarrier_bytes;
446-
const bool m_require_standard;
447-
const bool m_full_rbf;
448-
const bool m_persist_v1_dat;
449-
450-
const Limits m_limits;
451-
452-
ValidationSignals* const m_signals;
438+
const Options m_opts;
453439

454440
/** Create a new CTxMemPool.
455441
* Sanity checks will be off by default for performance, because otherwise
@@ -625,7 +611,7 @@ class CTxMemPool
625611
* would otherwise be half of this, it is set to 0 instead.
626612
*/
627613
CFeeRate GetMinFee() const {
628-
return GetMinFee(m_max_size_bytes);
614+
return GetMinFee(m_opts.max_size_bytes);
629615
}
630616

631617
/** Remove transactions from the mempool until its dynamic size is <= sizelimit.

0 commit comments

Comments
 (0)