main: don't undo indexes when verifying blocks at startup
This commit is contained in:
parent
24894cb748
commit
21c675855f
16
src/main.cpp
16
src/main.cpp
@ -2152,6 +2152,14 @@ bool DisconnectBlock(const CBlock& block, CValidationState& state, const CBlockI
|
||||
}
|
||||
|
||||
|
||||
// move best block pointer to prevout block
|
||||
view.SetBestBlock(pindex->pprev->GetBlockHash());
|
||||
|
||||
if (pfClean) {
|
||||
*pfClean = fClean;
|
||||
return true;
|
||||
}
|
||||
|
||||
if (fAddressIndex) {
|
||||
if (!pblocktree->EraseAddressIndex(addressIndex)) {
|
||||
return AbortNode(state, "Failed to delete address index");
|
||||
@ -2161,14 +2169,6 @@ bool DisconnectBlock(const CBlock& block, CValidationState& state, const CBlockI
|
||||
}
|
||||
}
|
||||
|
||||
// move best block pointer to prevout block
|
||||
view.SetBestBlock(pindex->pprev->GetBlockHash());
|
||||
|
||||
if (pfClean) {
|
||||
*pfClean = fClean;
|
||||
return true;
|
||||
}
|
||||
|
||||
return fClean;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user