| 86 | } |
| 87 | |
| 88 | static 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 | |
| 103 | BlockAssembler::BlockAssembler(CChainState& chainstate, const CTxMemPool& mempool, const CChainParams& params) |
| 104 | : BlockAssembler(chainstate, mempool, params, DefaultOptions()) {} |
no test coverage detected