diff --git a/src/init.cpp b/src/init.cpp --- a/src/init.cpp +++ b/src/init.cpp @@ -45,7 +45,6 @@ #include #include #include -#include #include #include #include @@ -1846,8 +1845,11 @@ // mempool limits int64_t nMempoolSizeMax = args.GetIntArg("-maxmempool", DEFAULT_MAX_MEMPOOL_SIZE) * 1000000; - // FIXME: this limit is no longer relevant after wellington activation - int64_t nMempoolSizeMin = DEFAULT_DESCENDANT_SIZE_LIMIT * 1000 * 40; + // FIXME: this legacy limit comes from the DEFAULT_DESCENDANT_SIZE_LIMIT + // (101) that was enforced before the wellington activation. While it's + // still a good idea to have some minimum mempool size, using this value as + // a threshold is no longer relevant. + int64_t nMempoolSizeMin = 101 * 1000 * 40; if (nMempoolSizeMax < 0 || (!chainparams.IsTestChain() && nMempoolSizeMax < nMempoolSizeMin)) { return InitError(strprintf(_("-maxmempool must be at least %d MB"), diff --git a/src/interfaces/chain.h b/src/interfaces/chain.h --- a/src/interfaces/chain.h +++ b/src/interfaces/chain.h @@ -205,12 +205,6 @@ const Amount &max_tx_fee, bool relay, std::string &err_string) = 0; - //! Get the node's package limits. - //! Currently only returns the ancestor and descendant count limits, but - //! could be enhanced to return more policy settings. - virtual void getPackageLimits(size_t &limit_ancestor_count, - size_t &limit_descendant_count) = 0; - //! Estimate fee virtual CFeeRate estimateFee() const = 0; diff --git a/src/node/interfaces.cpp b/src/node/interfaces.cpp --- a/src/node/interfaces.cpp +++ b/src/node/interfaces.cpp @@ -22,7 +22,6 @@ #include #include #include -#include #include #include #include @@ -623,11 +622,6 @@ // to know about. return err == TransactionError::OK; } - void getPackageLimits(size_t &limit_ancestor_count, - size_t &limit_descendant_count) override { - limit_ancestor_count = size_t(DEFAULT_ANCESTOR_LIMIT); - limit_descendant_count = size_t(DEFAULT_DESCENDANT_LIMIT); - } CFeeRate estimateFee() const override { if (!m_node.mempool) { return {}; diff --git a/src/policy/mempool.h b/src/policy/mempool.h deleted file mode 100644 --- a/src/policy/mempool.h +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) 2020 The Bitcoin developers -// Distributed under the MIT software license, see the accompanying -// file COPYING or http://www.opensource.org/licenses/mit-license.php. -#ifndef BITCOIN_POLICY_MEMPOOL_H -#define BITCOIN_POLICY_MEMPOOL_H - -#include - -#include - -class CBlockIndex; -namespace Consensus { -struct Params; -} - -/** - * Default for -limitancestorcount, max number of in-mempool ancestors. - * FIXME: Should be removed, it is no longer relevant since wellington. - */ -static constexpr unsigned int DEFAULT_ANCESTOR_LIMIT = 50; -/** - * Default for -limitancestorsize, maximum kilobytes of tx + all in-mempool - * ancestors. - * FIXME: Should be removed, it is no longer relevant since wellington. - */ -static constexpr unsigned int DEFAULT_ANCESTOR_SIZE_LIMIT = 101; -/** - * Default for -limitdescendantcount, max number of in-mempool descendants - * FIXME: Should be removed, it is no longer relevant since wellington. - */ -static constexpr unsigned int DEFAULT_DESCENDANT_LIMIT = 50; -/** - * Default for -limitdescendantsize, maximum kilobytes of in-mempool - * descendants. - * FIXME: Should be removed, it is no longer relevant since wellington. - */ -static const unsigned int DEFAULT_DESCENDANT_SIZE_LIMIT = 101; - -// If a package is submitted, it must be within the mempool's -// ancestor/descendant limits. Since a submitted package must be -// child-with-unconfirmed-parents (all of the transactions are an ancestor of -// the child), package limits are ultimately bounded by mempool package limits. -// Ensure that the defaults reflect this constraint. -static_assert(DEFAULT_DESCENDANT_LIMIT >= MAX_PACKAGE_COUNT); -static_assert(DEFAULT_ANCESTOR_LIMIT >= MAX_PACKAGE_COUNT); -static_assert(DEFAULT_ANCESTOR_SIZE_LIMIT >= MAX_PACKAGE_SIZE); -static_assert(DEFAULT_DESCENDANT_SIZE_LIMIT >= MAX_PACKAGE_SIZE); - -#endif // BITCOIN_POLICY_MEMPOOL_H diff --git a/src/txmempool.cpp b/src/txmempool.cpp --- a/src/txmempool.cpp +++ b/src/txmempool.cpp @@ -14,7 +14,6 @@ #include #include #include -#include #include #include #include diff --git a/src/validation.cpp b/src/validation.cpp --- a/src/validation.cpp +++ b/src/validation.cpp @@ -31,7 +31,6 @@ #include #include #include -#include #include #include #include diff --git a/src/wallet/spend.cpp b/src/wallet/spend.cpp --- a/src/wallet/spend.cpp +++ b/src/wallet/spend.cpp @@ -508,7 +508,6 @@ // limitation becomes irrelevant. size_t max_ancestors{0}; size_t max_descendants{0}; - wallet.chain().getPackageLimits(max_ancestors, max_descendants); // form groups from remaining coins; note that preset coins will not // automatically have their associated (same address) coins included diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -15,7 +15,6 @@ #include #include #include -#include #include #include #include