34 mempool_limits.descendant_count = argsman.GetIntArg("-limitdescendantcount", mempool_limits.descendant_count); 36 if (auto vkb = argsman.GetIntArg("-limitdescendantsize")) mempool_limits.descendant_size_vbytes = *vkb * 1'000;
46 if (
auto hours = argsman.
GetIntArg(
"-mempoolexpiry")) mempool_opts.
expiry = std::chrono::hours{*hours};
50 if (argsman.
IsArgSet(
"-incrementalrelayfee")) {
51 if (std::optional<CAmount> inc_relay_fee =
ParseMoney(argsman.
GetArg(
"-incrementalrelayfee",
""))) {
52 mempool_opts.incremental_relay_feerate =
CFeeRate{inc_relay_fee.value()};
58 if (argsman.
IsArgSet(
"-minrelaytxfee")) {
59 if (std::optional<CAmount> min_relay_feerate =
ParseMoney(argsman.
GetArg(
"-minrelaytxfee",
""))) {
61 mempool_opts.min_relay_feerate =
CFeeRate{min_relay_feerate.value()};
65 }
else if (mempool_opts.incremental_relay_feerate > mempool_opts.min_relay_feerate) {
67 mempool_opts.min_relay_feerate = mempool_opts.incremental_relay_feerate;
68 LogPrintf(
"Increasing minrelaytxfee to %s to match incrementalrelayfee\n", mempool_opts.min_relay_feerate.ToString());
73 if (argsman.
IsArgSet(
"-dustrelayfee")) {
74 if (std::optional<CAmount> parsed =
ParseMoney(argsman.
GetArg(
"-dustrelayfee",
""))) {
75 mempool_opts.dust_relay_feerate =
CFeeRate{parsed.value()};
86 mempool_opts.max_datacarrier_bytes = std::nullopt;
90 if (!chainparams.IsTestChain() && !mempool_opts.require_standard) {
94 mempool_opts.full_rbf = argsman.
GetBoolArg(
"-mempoolfullrbf", mempool_opts.full_rbf);
bool IsArgSet(const std::string &strArg) const
Return true if the given argument has been manually set.
bilingual_str AmountErrMsg(const std::string &optname, const std::string &strValue)
static const unsigned int MAX_OP_RETURN_RELAY
Default setting for -datacarriersize.
Options struct containing limit options for a CTxMemPool.
bilingual_str Untranslated(std::string original)
Mark a bilingual_str as untranslated.
CChainParams defines various tweakable parameters of a given instance of the Bitcoin system...
bool GetBoolArg(const std::string &strArg, bool fDefault) const
Return boolean argument or default value.
static constexpr bool DEFAULT_PERMIT_BAREMULTISIG
Default for -permitbaremultisig.
std::chrono::seconds expiry
util::Result< void > ApplyArgsManOptions(const ArgsManager &argsman, const CChainParams &chainparams, MemPoolOptions &mempool_opts)
Overlay the options set in argsman on top of corresponding members in mempool_opts.
std::optional< CAmount > ParseMoney(const std::string &money_string)
Parse an amount denoted in full coins.
int64_t ancestor_size_vbytes
The maximum allowed size in virtual bytes of an entry and its ancestors within a package.
int64_t GetIntArg(const std::string &strArg, int64_t nDefault) const
Return integer argument or default value.
std::string GetArg(const std::string &strArg, const std::string &strDefault) const
Return string argument or default value.
static constexpr bool DEFAULT_ACCEPT_NON_STD_TXN
Default for -acceptnonstdtxn.
Fee rate in satoshis per kilovirtualbyte: CAmount / kvB.
Options struct containing options for constructing a CTxMemPool.
int64_t ancestor_count
The maximum allowed number of transactions in a package including the entry and its ancestors...
static const bool DEFAULT_ACCEPT_DATACARRIER
Default for -datacarrier.