I could see that being an argument for doing away with BlockAssembler
entirely (at least as a public interface), and replacing BlockAssembler(chainstate, mempool, options).CreateNewBlock(scriptPubKeyIn)
it with a function: CreateNewBlock(chainstate, mempool, scriptPubKeyIn, options)
(effectively reverting #7598).
But if you’re keeping BlockAssembler
around, the entire point of that class is to assemble a block with txs from the mempool – that’s why most of its private functions require CTxMemPool::setEntries
references, eg – so it seems pretty strange to make it clumsier at doing that by pulling data it needs to do its job out of the class itself.
(Unrelated, but also seems a bit bogus to call the m_last_block_*
things “members” when they’re really globals…)