mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-19 21:31:37 +00:00
tests: fix eip1559 tx on non-eip1559 network (#23054)
This commit is contained in:
parent
b02922fc53
commit
c0a63a5295
1 changed files with 4 additions and 0 deletions
|
|
@ -19,6 +19,7 @@ package tests
|
|||
import (
|
||||
"encoding/hex"
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"math/big"
|
||||
"strings"
|
||||
|
|
@ -277,6 +278,9 @@ func (tx *stTransaction) toMessage(ps stPostState, number *big.Int, baseFee *big
|
|||
gasPrice = math.BigMin(new(big.Int).Add(tx.MaxPriorityFeePerGas, baseFee),
|
||||
tx.MaxFeePerGas)
|
||||
}
|
||||
if gasPrice == nil {
|
||||
return nil, errors.New("no gas price provided")
|
||||
}
|
||||
|
||||
msg := types.NewMessage(from, to, tx.Nonce, value, gasLimit, tx.GasPrice, tx.MaxFeePerGas, tx.MaxPriorityFeePerGas, data, accessList, true, nil, number)
|
||||
return msg, nil
|
||||
|
|
|
|||
Loading…
Reference in a new issue