fix(bls): precompile.Run call in fuzz function

This commit is contained in:
mrekucci 2024-04-23 20:07:29 -05:00
parent 275d380a65
commit 499b893728

View file

@ -19,12 +19,12 @@ package bls
import (
"bytes"
"fmt"
"github.com/holiman/uint256"
"math/big"
"time"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/vm"
"github.com/holiman/uint256"
)
const (
@ -111,7 +111,7 @@ func fuzz(id byte, data []byte) int {
}
cpy := make([]byte, len(data))
copy(cpy, data)
_, err := precompile.Run(cpy, vm.NewContext(common.HexToAddress("1337"), mockEVM))
_, err := precompile.Run(cpy)
if !bytes.Equal(cpy, data) {
panic(fmt.Sprintf("input data modified, precompile %d: %x %x", id, data, cpy))
}