Skip to content

Commit 912d8ac

Browse files
authored
Merge pull request #2331 from CortexFoundation/dev
fix history pruning initialization for empty DB
2 parents 1c9315b + 1726684 commit 912d8ac

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

core/blockchain.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -588,7 +588,7 @@ func (bc *BlockChain) initializeHistoryPruning(latest uint64) error {
588588
if predefinedPoint == nil {
589589
log.Error("Chain history pruning is not supported for this network", "genesis", bc.genesisBlock.Hash())
590590
return fmt.Errorf("history pruning requested for unknown network")
591-
} else if freezerTail != predefinedPoint.BlockNumber {
591+
} else if freezerTail > 0 && freezerTail != predefinedPoint.BlockNumber {
592592
log.Error("Chain history database is pruned to unknown block", "tail", freezerTail)
593593
return fmt.Errorf("unexpected database tail")
594594
}

0 commit comments

Comments
 (0)