@@ -682,7 +682,7 @@ func (bc *BlockChain) initializeHistoryPruning(latest uint64) error {
682682 predefinedPoint := history .PrunePoints [bc .genesisBlock .Hash ()]
683683 if predefinedPoint == nil || freezerTail != predefinedPoint .BlockNumber {
684684 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" )
686686 }
687687 bc .historyPrunePoint .Store (predefinedPoint )
688688 return nil
@@ -695,15 +695,15 @@ func (bc *BlockChain) initializeHistoryPruning(latest uint64) error {
695695 // action to happen. So just tell them how to do it.
696696 log .Error (fmt .Sprintf ("Chain history mode is configured as %q, but database is not pruned." , bc .cfg .ChainHistoryMode .String ()))
697697 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" )
699699 }
700700 predefinedPoint := history .PrunePoints [bc .genesisBlock .Hash ()]
701701 if predefinedPoint == nil {
702702 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" )
704704 } else if freezerTail > 0 && freezerTail != predefinedPoint .BlockNumber {
705705 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" )
707707 }
708708 bc .historyPrunePoint .Store (predefinedPoint )
709709 return nil
0 commit comments