mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 23:18:14 +01:00
Do not pass CChainParams& to BlockAssembler constructor
This commit is contained in:
@@ -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()
|
||||
{
|
||||
|
||||
@@ -157,8 +157,8 @@ public:
|
||||
CFeeRate blockMinFeeRate;
|
||||
};
|
||||
|
||||
explicit BlockAssembler(CChainState& chainstate, const CTxMemPool& mempool, const CChainParams& params);
|
||||
explicit BlockAssembler(CChainState& chainstate, const CTxMemPool& mempool, const CChainParams& params, const Options& options);
|
||||
explicit BlockAssembler(CChainState& chainstate, const CTxMemPool& mempool);
|
||||
explicit BlockAssembler(CChainState& chainstate, const CTxMemPool& mempool, const Options& options);
|
||||
|
||||
/** Construct a new block template with coinbase to scriptPubKeyIn */
|
||||
std::unique_ptr<CBlockTemplate> CreateNewBlock(const CScript& scriptPubKeyIn);
|
||||
|
||||
Reference in New Issue
Block a user