mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-16 00:43:46 +00:00
fix(bls): precompile.Run call in fuzz function
This commit is contained in:
parent
275d380a65
commit
499b893728
1 changed files with 2 additions and 2 deletions
|
|
@ -19,12 +19,12 @@ package bls
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/holiman/uint256"
|
|
||||||
"math/big"
|
"math/big"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/ethereum/go-ethereum/common"
|
"github.com/ethereum/go-ethereum/common"
|
||||||
"github.com/ethereum/go-ethereum/core/vm"
|
"github.com/ethereum/go-ethereum/core/vm"
|
||||||
|
"github.com/holiman/uint256"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|
@ -111,7 +111,7 @@ func fuzz(id byte, data []byte) int {
|
||||||
}
|
}
|
||||||
cpy := make([]byte, len(data))
|
cpy := make([]byte, len(data))
|
||||||
copy(cpy, data)
|
copy(cpy, data)
|
||||||
_, err := precompile.Run(cpy, vm.NewContext(common.HexToAddress("1337"), mockEVM))
|
_, err := precompile.Run(cpy)
|
||||||
if !bytes.Equal(cpy, data) {
|
if !bytes.Equal(cpy, data) {
|
||||||
panic(fmt.Sprintf("input data modified, precompile %d: %x %x", id, data, cpy))
|
panic(fmt.Sprintf("input data modified, precompile %d: %x %x", id, data, cpy))
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue