@@ -255,7 +255,7 @@ CBlockIndex* BlockManager::InsertBlockIndex(const uint256& hash)
255255
256256bool BlockManager::LoadBlockIndex (const Consensus::Params& consensus_params)
257257{
258- if (!m_block_tree_db->LoadBlockIndexGuts (consensus_params , [this ](const uint256& hash) EXCLUSIVE_LOCKS_REQUIRED (cs_main) { return this ->InsertBlockIndex (hash); })) {
258+ if (!m_block_tree_db->LoadBlockIndexGuts (GetConsensus () , [this ](const uint256& hash) EXCLUSIVE_LOCKS_REQUIRED (cs_main) { return this ->InsertBlockIndex (hash); })) {
259259 return false ;
260260 }
261261
@@ -729,7 +729,7 @@ bool BlockManager::WriteUndoDataForBlock(const CBlockUndo& blockundo, BlockValid
729729 if (!FindUndoPos (state, pindex->nFile , _pos, ::GetSerializeSize (blockundo, CLIENT_VERSION) + 40 )) {
730730 return error (" ConnectBlock(): FindUndoPos failed" );
731731 }
732- if (!UndoWriteToDisk (blockundo, _pos, pindex->pprev ->GetBlockHash (), chainparams .MessageStart ())) {
732+ if (!UndoWriteToDisk (blockundo, _pos, pindex->pprev ->GetBlockHash (), GetParams () .MessageStart ())) {
733733 return AbortNode (state, " Failed to write undo data" );
734734 }
735735 // rev files are written in block height order, whereas blk files are written as blocks come in (often out of order)
@@ -847,7 +847,7 @@ FlatFilePos BlockManager::SaveBlockToDisk(const CBlock& block, int nHeight, CCha
847847 return FlatFilePos ();
848848 }
849849 if (!position_known) {
850- if (!WriteBlockToDisk (block, blockPos, chainparams .MessageStart ())) {
850+ if (!WriteBlockToDisk (block, blockPos, GetParams () .MessageStart ())) {
851851 AbortNode (" Failed to write block" );
852852 return FlatFilePos ();
853853 }
0 commit comments