aboutsummaryrefslogtreecommitdiff
path: root/src/node
diff options
context:
space:
mode:
authorMacroFake <falke.marco@gmail.com>2022-05-18 18:31:12 +0200
committerMacroFake <falke.marco@gmail.com>2022-05-18 18:46:07 +0200
commitfafe5c0ca2927642cbcec63ac73994737e1653d6 (patch)
treeac304a0294f1016e8b6aaedd3b27fe3d2ffe2897 /src/node
parentfaf012b438b451dced785e7f031e07c0c55665e1 (diff)
Do not pass CChainParams& to BlockAssembler constructor
Diffstat (limited to 'src/node')
-rw-r--r--src/node/miner.cpp8
-rw-r--r--src/node/miner.h4
2 files changed, 6 insertions, 6 deletions
diff --git a/src/node/miner.cpp b/src/node/miner.cpp
index 770ccdbe1a..48e50f3714 100644
--- a/src/node/miner.cpp
+++ b/src/node/miner.cpp
@@ -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()
{
diff --git a/src/node/miner.h b/src/node/miner.h
index 678df815c0..7cf8e3fb9e 100644
--- a/src/node/miner.h
+++ b/src/node/miner.h
@@ -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);