eth,consensus: replace noarg fmt.Errorf with errors.New (#27330)

* eth: replace noarg fmt.Errorf with errors.New

Signed-off-by: jsvisa <delweng@gmail.com>

* consensus: replace noarg fmt.Errorf with errors.New

Signed-off-by: jsvisa <delweng@gmail.com>

---------

Signed-off-by: jsvisa <delweng@gmail.com>
This commit is contained in:
Delweng
2023-05-25 02:57:34 -04:00
committed by GitHub
parent b21ba668e6
commit 8a78a4f79f
11 changed files with 32 additions and 24 deletions
+2 -1
View File
@@ -17,6 +17,7 @@
package misc
import (
"errors"
"fmt"
"math/big"
@@ -40,7 +41,7 @@ func VerifyEip1559Header(config *params.ChainConfig, parent, header *types.Heade
}
// Verify the header is not malformed
if header.BaseFee == nil {
return fmt.Errorf("header is missing baseFee")
return errors.New("header is missing baseFee")
}
// Verify the baseFee is correct based on the parent header.
expectedBaseFee := CalcBaseFee(config, parent)