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

pull/23068/head
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), gasPrice = math.BigMin(new(big.Int).Add(tx.MaxPriorityFeePerGas, baseFee),
tx.MaxFeePerGas) tx.MaxFeePerGas)
} }
if gasPrice == nil {
return nil, fmt.Errorf("no gas price provided")
}
msg := types.NewMessage(from, to, tx.Nonce, value, gasLimit, gasPrice, msg := types.NewMessage(from, to, tx.Nonce, value, gasLimit, gasPrice,
tx.MaxFeePerGas, tx.MaxPriorityFeePerGas, data, accessList, true) tx.MaxFeePerGas, tx.MaxPriorityFeePerGas, data, accessList, true)

Loading…
Cancel
Save