Skip to content

Commit 5a33bb1

Browse files
furszyFuzzbawls
authored andcommitted
[Validation] Remove unused DisconnectBlocks function.
Github-Pull: #2058 Rebased-From: 544b6bc
1 parent 76ae626 commit 5a33bb1

File tree

2 files changed

+0
-16
lines changed

2 files changed

+0
-16
lines changed

src/validation.cpp

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2095,19 +2095,6 @@ bool static ConnectTip(CValidationState& state, CBlockIndex* pindexNew, const st
20952095
return true;
20962096
}
20972097

2098-
bool DisconnectBlocks(int nBlocks, const CChainParams& chainparams)
2099-
{
2100-
LOCK(cs_main);
2101-
2102-
CValidationState state;
2103-
2104-
LogPrintf("%s: Got command to replay %d blocks\n", __func__, nBlocks);
2105-
for (int i = 0; i <= nBlocks; i++)
2106-
DisconnectTip(state, chainparams);
2107-
2108-
return true;
2109-
}
2110-
21112098
/**
21122099
* Return the tip of the chain with the most work in it, that isn't
21132100
* known to be invalid (it's however far from certain to be valid).

src/validation.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -329,9 +329,6 @@ bool ReadBlockFromDisk(CBlock& block, const CBlockIndex* pindex);
329329
* of problems. Note that in any case, coins may be modified. */
330330
bool DisconnectBlock(CBlock& block, CValidationState& state, CBlockIndex* pindex, CCoinsViewCache& coins, bool* pfClean = NULL);
331331

332-
/** Reprocess a number of blocks to try and get on the correct chain again **/
333-
bool DisconnectBlocks(int nBlocks, const CChainParams& chainparams);
334-
335332
/** Apply the effects of this block (with given index) on the UTXO set represented by coins */
336333
bool ConnectBlock(const CBlock& block, CValidationState& state, CBlockIndex* pindex, CCoinsViewCache& coins, bool fJustCheck, bool fAlreadyChecked = false);
337334

0 commit comments

Comments
 (0)