Skip to content

Commit

Permalink
fix(bls): precompile.Run call in fuzz function
Browse files Browse the repository at this point in the history
  • Loading branch information
mrekucci committed Apr 24, 2024
1 parent 275d380 commit 499b893
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/fuzzers/bls12381/precompile_fuzzer.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down Expand Up @@ -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))
}
Expand Down

0 comments on commit 499b893

Please sign in to comment.