diff options
author | Jorge Timón <jtimon@jtimon.cc> | 2016-11-07 23:31:55 +0100 |
---|---|---|
committer | Jorge Timón <jtimon@jtimon.cc> | 2017-05-18 22:23:10 +0200 |
commit | b324b2820903e777f3bbf5bf96686bbe723d8df7 (patch) | |
tree | 1bcdd78a47c367edd3262093e0cf0b3700f912ae /src/txdb.cpp | |
parent | ea6fde3f1d2694176a657b69fb0eeb5426e6f309 (diff) |
Globals: Pass Consensus::Params through CBlockTreeDB::LoadBlockIndexGuts()
Diffstat (limited to 'src/txdb.cpp')
-rw-r--r-- | src/txdb.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/txdb.cpp b/src/txdb.cpp index 42dc31760b..07e1340423 100644 --- a/src/txdb.cpp +++ b/src/txdb.cpp @@ -169,7 +169,7 @@ bool CBlockTreeDB::ReadFlag(const std::string &name, bool &fValue) { return true; } -bool CBlockTreeDB::LoadBlockIndexGuts(std::function<CBlockIndex*(const uint256&)> insertBlockIndex) +bool CBlockTreeDB::LoadBlockIndexGuts(const Consensus::Params& consensusParams, std::function<CBlockIndex*(const uint256&)> insertBlockIndex) { std::unique_ptr<CDBIterator> pcursor(NewIterator()); @@ -197,12 +197,12 @@ bool CBlockTreeDB::LoadBlockIndexGuts(std::function<CBlockIndex*(const uint256&) pindexNew->nStatus = diskindex.nStatus; pindexNew->nTx = diskindex.nTx; - if (!CheckProofOfWork(pindexNew->GetBlockHash(), pindexNew->nBits, Params().GetConsensus())) - return error("LoadBlockIndex(): CheckProofOfWork failed: %s", pindexNew->ToString()); + if (!CheckProofOfWork(pindexNew->GetBlockHash(), pindexNew->nBits, consensusParams)) + return error("%s: CheckProofOfWork failed: %s", __func__, pindexNew->ToString()); pcursor->Next(); } else { - return error("LoadBlockIndex() : failed to read value"); + return error("%s: failed to read value", __func__); } } else { break; |