Do not pass CChainParams& to BlockAssembler constructor

This commit is contained in:
MacroFake 2022-05-18 18:31:12 +02:00
parent faf012b438
commit fafe5c0ca2
No known key found for this signature in database
GPG key ID: CE2B75697E69A548
9 changed files with 16 additions and 16 deletions

View file

@ -62,8 +62,8 @@ BlockAssembler::Options::Options()
nBlockMaxWeight = DEFAULT_BLOCK_MAX_WEIGHT;
}
BlockAssembler::BlockAssembler(CChainState& chainstate, const CTxMemPool& mempool, const CChainParams& params, const Options& options)
: chainparams(params),
BlockAssembler::BlockAssembler(CChainState& chainstate, const CTxMemPool& mempool, const Options& options)
: chainparams{chainstate.m_chainman.GetParams()},
m_mempool(mempool),
m_chainstate(chainstate)
{
@ -87,8 +87,8 @@ static BlockAssembler::Options DefaultOptions()
return options;
}
BlockAssembler::BlockAssembler(CChainState& chainstate, const CTxMemPool& mempool, const CChainParams& params)
: BlockAssembler(chainstate, mempool, params, DefaultOptions()) {}
BlockAssembler::BlockAssembler(CChainState& chainstate, const CTxMemPool& mempool)
: BlockAssembler(chainstate, mempool, DefaultOptions()) {}
void BlockAssembler::resetBlock()
{