From d0b01f3a859eacc51a28fc18d2ed7e361ec90833 Mon Sep 17 00:00:00 2001 From: Geoffrey Tsui Date: Tue, 25 Oct 2016 22:35:26 +0800 Subject: Explicitly pass const CChainParams& to LoadBlockIndexDB() --- src/main.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/main.cpp') diff --git a/src/main.cpp b/src/main.cpp index 5e17ec625..0ee54a27d 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -3966,9 +3966,8 @@ CBlockIndex * InsertBlockIndex(uint256 hash) return pindexNew; } -bool static LoadBlockIndexDB() +bool static LoadBlockIndexDB(const CChainParams& chainparams) { - const CChainParams& chainparams = Params(); if (!pblocktree->LoadBlockIndexGuts(InsertBlockIndex)) return false; @@ -4297,10 +4296,10 @@ void UnloadBlockIndex() fHavePruned = false; } -bool LoadBlockIndex() +bool LoadBlockIndex(const CChainParams& chainparams) { // Load block index from databases - if (!fReindex && !LoadBlockIndexDB()) + if (!fReindex && !LoadBlockIndexDB(chainparams)) return false; return true; } -- cgit v1.2.3