Changeset View
Changeset View
Standalone View
Standalone View
src/init.cpp
Show All 39 Lines | |||||
#include <net_processing.h> | #include <net_processing.h> | ||||
#include <netbase.h> | #include <netbase.h> | ||||
#include <node/blockstorage.h> | #include <node/blockstorage.h> | ||||
#include <node/caches.h> | #include <node/caches.h> | ||||
#include <node/chainstate.h> | #include <node/chainstate.h> | ||||
#include <node/context.h> | #include <node/context.h> | ||||
#include <node/miner.h> | #include <node/miner.h> | ||||
#include <node/ui_interface.h> | #include <node/ui_interface.h> | ||||
#include <policy/mempool.h> | |||||
#include <policy/policy.h> | #include <policy/policy.h> | ||||
#include <policy/settings.h> | #include <policy/settings.h> | ||||
#include <rpc/blockchain.h> | #include <rpc/blockchain.h> | ||||
#include <rpc/register.h> | #include <rpc/register.h> | ||||
#include <rpc/server.h> | #include <rpc/server.h> | ||||
#include <rpc/util.h> | #include <rpc/util.h> | ||||
#include <scheduler.h> | #include <scheduler.h> | ||||
#include <script/scriptcache.h> | #include <script/scriptcache.h> | ||||
▲ Show 20 Lines • Show All 1,784 Lines • ▼ Show 20 Lines | if (nMinimumChainWork < | ||||
UintToArith256(chainparams.GetConsensus().nMinimumChainWork)) { | UintToArith256(chainparams.GetConsensus().nMinimumChainWork)) { | ||||
LogPrintf("Warning: nMinimumChainWork set below default value of %s\n", | LogPrintf("Warning: nMinimumChainWork set below default value of %s\n", | ||||
chainparams.GetConsensus().nMinimumChainWork.GetHex()); | chainparams.GetConsensus().nMinimumChainWork.GetHex()); | ||||
} | } | ||||
// mempool limits | // mempool limits | ||||
int64_t nMempoolSizeMax = | int64_t nMempoolSizeMax = | ||||
args.GetIntArg("-maxmempool", DEFAULT_MAX_MEMPOOL_SIZE) * 1000000; | args.GetIntArg("-maxmempool", DEFAULT_MAX_MEMPOOL_SIZE) * 1000000; | ||||
// FIXME: this limit is no longer relevant after wellington activation | // FIXME: this legacy limit comes from the DEFAULT_DESCENDANT_SIZE_LIMIT | ||||
int64_t nMempoolSizeMin = DEFAULT_DESCENDANT_SIZE_LIMIT * 1000 * 40; | // (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 || | if (nMempoolSizeMax < 0 || | ||||
(!chainparams.IsTestChain() && nMempoolSizeMax < nMempoolSizeMin)) { | (!chainparams.IsTestChain() && nMempoolSizeMax < nMempoolSizeMin)) { | ||||
return InitError(strprintf(_("-maxmempool must be at least %d MB"), | return InitError(strprintf(_("-maxmempool must be at least %d MB"), | ||||
std::ceil(nMempoolSizeMin / 1000000.0))); | std::ceil(nMempoolSizeMin / 1000000.0))); | ||||
} | } | ||||
// Configure excessive block size. | // Configure excessive block size. | ||||
const int64_t nProposedExcessiveBlockSize = | const int64_t nProposedExcessiveBlockSize = | ||||
▲ Show 20 Lines • Show All 1,102 Lines • Show Last 20 Lines |