mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-18 22:35:39 +01:00
Globals: Explicit Consensus::Params arg for main:
-CheckBlockIndex -DisconnectTip -GetTransaction -InvalidateBlock -ProcessGetData -ReadBlockFromDisk
This commit is contained in:
@@ -405,7 +405,7 @@ UniValue getblock(const UniValue& params, bool fHelp)
|
||||
if (fHavePruned && !(pblockindex->nStatus & BLOCK_HAVE_DATA) && pblockindex->nTx > 0)
|
||||
throw JSONRPCError(RPC_INTERNAL_ERROR, "Block not available (pruned data)");
|
||||
|
||||
if(!ReadBlockFromDisk(block, pblockindex))
|
||||
if(!ReadBlockFromDisk(block, pblockindex, Params().GetConsensus()))
|
||||
throw JSONRPCError(RPC_INTERNAL_ERROR, "Can't read block from disk");
|
||||
|
||||
if (!fVerbose)
|
||||
@@ -824,7 +824,7 @@ UniValue invalidateblock(const UniValue& params, bool fHelp)
|
||||
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Block not found");
|
||||
|
||||
CBlockIndex* pblockindex = mapBlockIndex[hash];
|
||||
InvalidateBlock(state, pblockindex);
|
||||
InvalidateBlock(state, Params().GetConsensus(), pblockindex);
|
||||
}
|
||||
|
||||
if (state.IsValid()) {
|
||||
|
||||
Reference in New Issue
Block a user