Skip to content

Commit

Permalink
[Validation] Remove unused DisconnectBlocks function.
Browse files Browse the repository at this point in the history
Github-Pull: #2058
Rebased-From: 544b6bc
  • Loading branch information
furszy authored and Fuzzbawls committed Dec 17, 2020
1 parent 76ae626 commit 5a33bb1
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 16 deletions.
13 changes: 0 additions & 13 deletions src/validation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2095,19 +2095,6 @@ bool static ConnectTip(CValidationState& state, CBlockIndex* pindexNew, const st
return true;
}

bool DisconnectBlocks(int nBlocks, const CChainParams& chainparams)
{
LOCK(cs_main);

CValidationState state;

LogPrintf("%s: Got command to replay %d blocks\n", __func__, nBlocks);
for (int i = 0; i <= nBlocks; i++)
DisconnectTip(state, chainparams);

return true;
}

/**
* Return the tip of the chain with the most work in it, that isn't
* known to be invalid (it's however far from certain to be valid).
Expand Down
3 changes: 0 additions & 3 deletions src/validation.h
Original file line number Diff line number Diff line change
Expand Up @@ -329,9 +329,6 @@ bool ReadBlockFromDisk(CBlock& block, const CBlockIndex* pindex);
* of problems. Note that in any case, coins may be modified. */
bool DisconnectBlock(CBlock& block, CValidationState& state, CBlockIndex* pindex, CCoinsViewCache& coins, bool* pfClean = NULL);

/** Reprocess a number of blocks to try and get on the correct chain again **/
bool DisconnectBlocks(int nBlocks, const CChainParams& chainparams);

/** Apply the effects of this block (with given index) on the UTXO set represented by coins */
bool ConnectBlock(const CBlock& block, CValidationState& state, CBlockIndex* pindex, CCoinsViewCache& coins, bool fJustCheck, bool fAlreadyChecked = false);

Expand Down

0 comments on commit 5a33bb1

Please sign in to comment.