Skip to content

Commit

Permalink
tests: fix eip1559 tx on non-eip1559 network (#23054)
Browse files Browse the repository at this point in the history
  • Loading branch information
MariusVanDerWijden authored Jun 18, 2021
1 parent 58aeab7 commit ef946a6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/state_test_util.go
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,9 @@ func (tx *stTransaction) toMessage(ps stPostState, baseFee *big.Int) (core.Messa
gasPrice = math.BigMin(new(big.Int).Add(tx.MaxPriorityFeePerGas, baseFee),
tx.MaxFeePerGas)
}
if gasPrice == nil {
return nil, fmt.Errorf("no gas price provided")
}

msg := types.NewMessage(from, to, tx.Nonce, value, gasLimit, gasPrice,
tx.MaxFeePerGas, tx.MaxPriorityFeePerGas, data, accessList, true)
Expand Down

0 comments on commit ef946a6

Please sign in to comment.