cmd: use errrors.New instead of empty fmt.Errorf (#27329)
Signed-off-by: jsvisa <delweng@gmail.com>
This commit is contained in:
+2
-2
@@ -184,7 +184,7 @@ func ImportChain(chain *core.BlockChain, fn string) error {
|
||||
for batch := 0; ; batch++ {
|
||||
// Load a batch of RLP blocks.
|
||||
if checkInterrupt() {
|
||||
return fmt.Errorf("interrupted")
|
||||
return errors.New("interrupted")
|
||||
}
|
||||
i := 0
|
||||
for ; i < importBatchSize; i++ {
|
||||
@@ -207,7 +207,7 @@ func ImportChain(chain *core.BlockChain, fn string) error {
|
||||
}
|
||||
// Import the batch.
|
||||
if checkInterrupt() {
|
||||
return fmt.Errorf("interrupted")
|
||||
return errors.New("interrupted")
|
||||
}
|
||||
missing := missingBlocks(chain, blocks[:i])
|
||||
if len(missing) == 0 {
|
||||
|
||||
Reference in New Issue
Block a user