core: unnecessary use of fmt.Sprintf

This commit is contained in:
cuiweixie 2025-07-31 13:25:52 +08:00
parent 4997a248ab
commit 69d553ba00

View file

@ -651,7 +651,7 @@ func (bc *BlockChain) initializeHistoryPruning(latest uint64) error {
// here, but it'd be a bit dangerous since they may not have intended this // here, but it'd be a bit dangerous since they may not have intended this
// action to happen. So just tell them how to do it. // action to happen. So just tell them how to do it.
log.Error(fmt.Sprintf("Chain history mode is configured as %q, but database is not pruned.", bc.cacheConfig.ChainHistoryMode.String())) log.Error(fmt.Sprintf("Chain history mode is configured as %q, but database is not pruned.", bc.cacheConfig.ChainHistoryMode.String()))
log.Error(fmt.Sprintf("Run 'geth prune-history' to prune pre-merge history.")) log.Error("Run 'geth prune-history' to prune pre-merge history.")
return fmt.Errorf("history pruning requested via configuration") return fmt.Errorf("history pruning requested via configuration")
} }
predefinedPoint := history.PrunePoints[bc.genesisBlock.Hash()] predefinedPoint := history.PrunePoints[bc.genesisBlock.Hash()]