MCPcopy Create free account
hub / github.com/ElementsProject/elements / DefaultOptions

Function DefaultOptions

src/node/miner.cpp:88–101  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

86}
87
88static BlockAssembler::Options DefaultOptions()
89{
90 // Block resource limits
91 // If -blockmaxweight is not given, limit to DEFAULT_BLOCK_MAX_WEIGHT
92 BlockAssembler::Options options;
93 options.nBlockMaxWeight = gArgs.GetIntArg("-blockmaxweight", DEFAULT_BLOCK_MAX_WEIGHT);
94 if (gArgs.IsArgSet("-blockmintxfee")) {
95 std::optional<CAmount> parsed = ParseMoney(gArgs.GetArg("-blockmintxfee", ""));
96 options.blockMinFeeRate = CFeeRate{parsed.value_or(DEFAULT_BLOCK_MIN_TX_FEE)};
97 } else {
98 options.blockMinFeeRate = CFeeRate{DEFAULT_BLOCK_MIN_TX_FEE};
99 }
100 return options;
101}
102
103BlockAssembler::BlockAssembler(CChainState& chainstate, const CTxMemPool& mempool, const CChainParams& params)
104 : BlockAssembler(chainstate, mempool, params, DefaultOptions()) {}

Callers 1

BlockAssemblerMethod · 0.85

Calls 4

ParseMoneyFunction · 0.85
GetIntArgMethod · 0.80
IsArgSetMethod · 0.80
GetArgMethod · 0.80

Tested by

no test coverage detected