Fix linter

This commit is contained in:
Jerry 2023-03-03 08:39:10 -08:00
parent c7cc8c08ed
commit 8698da045f

View file

@ -29,6 +29,7 @@ import (
"github.com/ethereum/go-ethereum/crypto/bls12381" "github.com/ethereum/go-ethereum/crypto/bls12381"
"github.com/ethereum/go-ethereum/crypto/bn256" "github.com/ethereum/go-ethereum/crypto/bn256"
"github.com/ethereum/go-ethereum/params" "github.com/ethereum/go-ethereum/params"
big2 "github.com/holiman/big" big2 "github.com/holiman/big"
"golang.org/x/crypto/ripemd160" "golang.org/x/crypto/ripemd160"
) )
@ -384,6 +385,7 @@ func (c *bigModExp) Run(input []byte) ([]byte, error) {
mod = new(big2.Int).SetBytes(getData(input, baseLen+expLen, modLen)) mod = new(big2.Int).SetBytes(getData(input, baseLen+expLen, modLen))
v []byte v []byte
) )
switch { switch {
case mod.BitLen() == 0: case mod.BitLen() == 0:
// Modulo 0 is undefined, return zero // Modulo 0 is undefined, return zero
@ -394,6 +396,7 @@ func (c *bigModExp) Run(input []byte) ([]byte, error) {
default: default:
v = base.Exp(base, exp, mod).Bytes() v = base.Exp(base, exp, mod).Bytes()
} }
return common.LeftPadBytes(v, int(modLen)), nil return common.LeftPadBytes(v, int(modLen)), nil
} }