diff --git a/tests/state_test_util.go b/tests/state_test_util.go index 227ef77cc4ed..97fd3fb6a89e 100644 --- a/tests/state_test_util.go +++ b/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)