@@ -682,7 +682,7 @@ func (bc *BlockChain) initializeHistoryPruning(latest uint64) error {
682
682
predefinedPoint := history .PrunePoints [bc .genesisBlock .Hash ()]
683
683
if predefinedPoint == nil || freezerTail != predefinedPoint .BlockNumber {
684
684
log .Error ("Chain history database is pruned with unknown configuration" , "tail" , freezerTail )
685
- return fmt . Errorf ("unexpected database tail" )
685
+ return errors . New ("unexpected database tail" )
686
686
}
687
687
bc .historyPrunePoint .Store (predefinedPoint )
688
688
return nil
@@ -695,15 +695,15 @@ func (bc *BlockChain) initializeHistoryPruning(latest uint64) error {
695
695
// action to happen. So just tell them how to do it.
696
696
log .Error (fmt .Sprintf ("Chain history mode is configured as %q, but database is not pruned." , bc .cfg .ChainHistoryMode .String ()))
697
697
log .Error (fmt .Sprintf ("Run 'geth prune-history' to prune pre-merge history." ))
698
- return fmt . Errorf ("history pruning requested via configuration" )
698
+ return errors . New ("history pruning requested via configuration" )
699
699
}
700
700
predefinedPoint := history .PrunePoints [bc .genesisBlock .Hash ()]
701
701
if predefinedPoint == nil {
702
702
log .Error ("Chain history pruning is not supported for this network" , "genesis" , bc .genesisBlock .Hash ())
703
- return fmt . Errorf ("history pruning requested for unknown network" )
703
+ return errors . New ("history pruning requested for unknown network" )
704
704
} else if freezerTail > 0 && freezerTail != predefinedPoint .BlockNumber {
705
705
log .Error ("Chain history database is pruned to unknown block" , "tail" , freezerTail )
706
- return fmt . Errorf ("unexpected database tail" )
706
+ return errors . New ("unexpected database tail" )
707
707
}
708
708
bc .historyPrunePoint .Store (predefinedPoint )
709
709
return nil
0 commit comments