diff options
author | MacroFake <falke.marco@gmail.com> | 2022-05-18 18:49:36 +0200 |
---|---|---|
committer | MacroFake <falke.marco@gmail.com> | 2022-05-18 18:45:30 +0200 |
commit | faf012b438b451dced785e7f031e07c0c55665e1 (patch) | |
tree | 1e409aa5f6bee128cc2b2fcf16dbc5470d0c38d7 /src/node/chainstate.cpp | |
parent | fa4ee53dca5ccf1b87f019f372ffc10528add943 (diff) | |
download | bitcoin-faf012b438b451dced785e7f031e07c0c55665e1.tar.xz |
Do not pass Consensus::Params& to Chainstate helpers
Diffstat (limited to 'src/node/chainstate.cpp')
-rw-r--r-- | src/node/chainstate.cpp | 6 |
1 files changed, 2 insertions, 4 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; |