mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-19 14:53:43 +01:00
Fix -loadblock after shutdown during IBD
This commit is contained in:
@@ -3136,7 +3136,7 @@ bool LoadExternalBlockFile(FILE* fileIn, CDiskBlockPos *dbp)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// process in case the block isn't known yet
|
// process in case the block isn't known yet
|
||||||
if (mapBlockIndex.count(hash) == 0) {
|
if (mapBlockIndex.count(hash) == 0 || (mapBlockIndex[hash]->nStatus & BLOCK_HAVE_DATA) == 0) {
|
||||||
CValidationState state;
|
CValidationState state;
|
||||||
if (ProcessBlock(state, NULL, &block, dbp))
|
if (ProcessBlock(state, NULL, &block, dbp))
|
||||||
nLoaded++;
|
nLoaded++;
|
||||||
|
|||||||
Reference in New Issue
Block a user