Skip to content

Commit

Permalink
Fix les fuzzer test (ethereum#70)
Browse files Browse the repository at this point in the history
  • Loading branch information
Inphi committed Dec 2, 2022
1 parent f2d8e79 commit a9531e8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/fuzzers/les/les-fuzzer.go
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ func Fuzz(input []byte) int {
f.doFuzz(l.GetHelperTrieProofsMsg, req)

case 6:
req := &l.SendTxPacket{Txs: make([]*types.Transaction, f.randomInt(l.MaxTxSend+1))}
req := &l.SendTxPacket{Txs: make([]*types.NetworkTransaction, f.randomInt(l.MaxTxSend+1))}
signer := types.HomesteadSigner{}
for i := range req.Txs {
var nonce uint64
Expand All @@ -390,7 +390,8 @@ func Fuzz(input []byte) int {
nonce = f.nonce
f.nonce += 1
}
req.Txs[i], _ = types.SignTx(types.NewTransaction(nonce, common.Address{}, big.NewInt(10000), params.TxGas, big.NewInt(1000000000*int64(f.randomByte())), nil), signer, bankKey)
tx, _ := types.SignTx(types.NewTransaction(nonce, common.Address{}, big.NewInt(10000), params.TxGas, big.NewInt(1000000000*int64(f.randomByte())), nil), signer, bankKey)
req.Txs[i] = types.NewNetworkTransaction(tx)
}
f.doFuzz(l.SendTxV2Msg, req)

Expand Down

0 comments on commit a9531e8

Please sign in to comment.