tests: fix eip1559 tx on non-eip1559 network (#23054)

revert-23120-drop-eth-65
Marius van der Wijden 3 years ago committed by GitHub
parent 58aeab77d2
commit ef946a6c87
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      tests/state_test_util.go

@ -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)

Loading…
Cancel
Save