35 mempool_limits.descendant_count = argsman.GetIntArg("-limitdescendantcount", mempool_limits.descendant_count); 37 if (auto vkb = argsman.GetIntArg("-limitdescendantsize")) mempool_limits.descendant_size_vbytes = *vkb * 1'000;
47 if (
auto hours = argsman.
GetIntArg(
"-mempoolexpiry")) mempool_opts.
expiry = std::chrono::hours{*hours};
51 if (argsman.
IsArgSet(
"-incrementalrelayfee")) {
52 if (std::optional<CAmount> inc_relay_fee =
ParseMoney(argsman.
GetArg(
"-incrementalrelayfee",
""))) {
53 mempool_opts.incremental_relay_feerate =
CFeeRate{inc_relay_fee.value()};
59 if (argsman.
IsArgSet(
"-minrelaytxfee")) {
60 if (std::optional<CAmount> min_relay_feerate =
ParseMoney(argsman.
GetArg(
"-minrelaytxfee",
""))) {
62 mempool_opts.min_relay_feerate =
CFeeRate{min_relay_feerate.value()};
66 }
else if (mempool_opts.incremental_relay_feerate > mempool_opts.min_relay_feerate) {
68 mempool_opts.min_relay_feerate = mempool_opts.incremental_relay_feerate;
69 LogPrintf(
"Increasing minrelaytxfee to %s to match incrementalrelayfee\n", mempool_opts.min_relay_feerate.ToString());
74 if (argsman.
IsArgSet(
"-dustrelayfee")) {
75 if (std::optional<CAmount> parsed =
ParseMoney(argsman.
GetArg(
"-dustrelayfee",
""))) {
76 mempool_opts.dust_relay_feerate =
CFeeRate{parsed.value()};
87 mempool_opts.max_datacarrier_bytes = std::nullopt;
91 if (!chainparams.IsTestChain() && !mempool_opts.require_standard) {
95 mempool_opts.full_rbf = argsman.
GetBoolArg(
"-mempoolfullrbf", mempool_opts.full_rbf);
96 if (!mempool_opts.full_rbf) {
97 LogInfo(
"Warning: mempoolfullrbf=0 set but deprecated and will be removed in a future release\n");
100 mempool_opts.persist_v1_dat = argsman.
GetBoolArg(
"-persistmempoolv1", mempool_opts.persist_v1_dat);
bool IsArgSet(const std::string &strArg) const
Return true if the given argument has been manually set.
static const unsigned int MAX_OP_RETURN_RELAY
Default setting for -datacarriersize.
is a home for simple string functions returning descriptive messages that are used in RPC and GUI int...
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.
bilingual_str AmountErrMsg(const std::string &optname, const std::string &strValue)
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.