diff --git a/src/main.cpp b/src/main.cpp index 89b0d181e..8f7dc686c 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -3169,7 +3169,7 @@ bool DisconnectBlocks(int blocks) const CChainParams& chainparams = Params(); LogPrintf("DisconnectBlocks -- Got command to replay %d blocks\n", blocks); - for(int i = 0; i <= blocks; i++) { + for(int i = 0; i < blocks; i++) { if(!DisconnectTip(state, chainparams.GetConsensus()) || !state.IsValid()) { return false; }