aboutsummaryrefslogtreecommitdiff
path: root/src/node
diff options
context:
space:
mode:
authorMacroFake <falke.marco@gmail.com>2022-05-18 18:49:36 +0200
committerMacroFake <falke.marco@gmail.com>2022-05-18 18:45:30 +0200
commitfaf012b438b451dced785e7f031e07c0c55665e1 (patch)
tree1e409aa5f6bee128cc2b2fcf16dbc5470d0c38d7 /src/node
parentfa4ee53dca5ccf1b87f019f372ffc10528add943 (diff)
downloadbitcoin-faf012b438b451dced785e7f031e07c0c55665e1.tar.xz
Do not pass Consensus::Params& to Chainstate helpers
Diffstat (limited to 'src/node')
-rw-r--r--src/node/chainstate.cpp6
-rw-r--r--src/node/chainstate.h2
2 files changed, 2 insertions, 6 deletions
diff --git a/src/node/chainstate.cpp b/src/node/chainstate.cpp
index 309c5f8f37..54ba5b7966 100644
--- a/src/node/chainstate.cpp
+++ b/src/node/chainstate.cpp
@@ -13,7 +13,6 @@ std::optional<ChainstateLoadingError> LoadChainstate(bool fReset,
ChainstateManager& chainman,
CTxMemPool* mempool,
bool fPruneMode,
- const Consensus::Params& consensus_params,
bool fReindexChainState,
int64_t nBlockTreeDBCache,
int64_t nCoinDBCache,
@@ -57,7 +56,7 @@ std::optional<ChainstateLoadingError> LoadChainstate(bool fReset,
}
if (!chainman.BlockIndex().empty() &&
- !chainman.m_blockman.LookupBlockIndex(consensus_params.hashGenesisBlock)) {
+ !chainman.m_blockman.LookupBlockIndex(chainman.GetConsensus().hashGenesisBlock)) {
return ChainstateLoadingError::ERROR_BAD_GENESIS_BLOCK;
}
@@ -126,7 +125,6 @@ std::optional<ChainstateLoadingError> LoadChainstate(bool fReset,
std::optional<ChainstateLoadVerifyError> VerifyLoadedChainstate(ChainstateManager& chainman,
bool fReset,
bool fReindexChainState,
- const Consensus::Params& consensus_params,
int check_blocks,
int check_level)
{
@@ -144,7 +142,7 @@ std::optional<ChainstateLoadVerifyError> VerifyLoadedChainstate(ChainstateManage
}
if (!CVerifyDB().VerifyDB(
- *chainstate, consensus_params, chainstate->CoinsDB(),
+ *chainstate, chainman.GetConsensus(), chainstate->CoinsDB(),
check_level,
check_blocks)) {
return ChainstateLoadVerifyError::ERROR_CORRUPTED_BLOCK_DB;
diff --git a/src/node/chainstate.h b/src/node/chainstate.h
index deeca5db06..ff7935e8e0 100644
--- a/src/node/chainstate.h
+++ b/src/node/chainstate.h
@@ -59,7 +59,6 @@ std::optional<ChainstateLoadingError> LoadChainstate(bool fReset,
ChainstateManager& chainman,
CTxMemPool* mempool,
bool fPruneMode,
- const Consensus::Params& consensus_params,
bool fReindexChainState,
int64_t nBlockTreeDBCache,
int64_t nCoinDBCache,
@@ -78,7 +77,6 @@ enum class ChainstateLoadVerifyError {
std::optional<ChainstateLoadVerifyError> VerifyLoadedChainstate(ChainstateManager& chainman,
bool fReset,
bool fReindexChainState,
- const Consensus::Params& consensus_params,
int check_blocks,
int check_level);
} // namespace node