internal/ethapi: use access list type if access list not empty

This commit is contained in:
Weixie Cui 2026-04-24 00:26:49 +08:00
parent 8e2107dc39
commit 7a76c0a108

View file

@ -513,6 +513,9 @@ func (args *TransactionArgs) ToTransaction(defaultType int) *types.Transaction {
// Make it possible to default to newer tx, but use legacy if gasprice is provided
if args.GasPrice != nil {
usedType = types.LegacyTxType
if args.AccessList != nil {
usedType = types.AccessListTxType
}
}
var data types.TxData
switch usedType {