| 98 | } |
| 99 | |
| 100 | BlockAssembler::BlockAssembler(Chainstate& chainstate, |
| 101 | const CTxMemPool* mempool, |
| 102 | BlockCreateOptions options) |
| 103 | : chainparams{chainstate.m_chainman.GetParams()}, |
| 104 | m_mempool{options.use_mempool ? mempool : nullptr}, |
| 105 | m_chainstate{chainstate}, |
| 106 | m_options{[&] { |
| 107 | if (auto result{CheckMiningOptions(options, /*use_argnames=*/false)}; !result) { |
| 108 | throw std::runtime_error(util::ErrorString(result).original); |
| 109 | } |
| 110 | return FlattenMiningOptions(std::move(options)); |
| 111 | }()} |
| 112 | { |
| 113 | } |
| 114 | |
| 115 | void BlockAssembler::resetBlock() |
| 116 | { |
nothing calls this directly
no test coverage detected