mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-05-27 02:09:27 +00:00
internal/ethapi: apply goimports formatting
This commit is contained in:
parent
aa2d52a180
commit
0268f2e03d
1 changed files with 16 additions and 16 deletions
|
|
@ -40,7 +40,7 @@ import (
|
||||||
// TransactionArgs represents the arguments to construct a new transaction
|
// TransactionArgs represents the arguments to construct a new transaction
|
||||||
// or a message call.
|
// or a message call.
|
||||||
type TransactionArgs struct {
|
type TransactionArgs struct {
|
||||||
Type *hexutil.Uint64 `json:"type,omitempty"`
|
Type *hexutil.Uint64 `json:"type,omitempty"`
|
||||||
|
|
||||||
From *common.Address `json:"from"`
|
From *common.Address `json:"from"`
|
||||||
To *common.Address `json:"to"`
|
To *common.Address `json:"to"`
|
||||||
|
|
@ -75,21 +75,21 @@ type TransactionArgs struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (args *TransactionArgs) inferTxType(defaultType int) int {
|
func (args *TransactionArgs) inferTxType(defaultType int) int {
|
||||||
usedType := types.LegacyTxType
|
usedType := types.LegacyTxType
|
||||||
switch {
|
switch {
|
||||||
case args.AuthorizationList != nil || defaultType == types.SetCodeTxType:
|
case args.AuthorizationList != nil || defaultType == types.SetCodeTxType:
|
||||||
usedType = types.SetCodeTxType
|
usedType = types.SetCodeTxType
|
||||||
case args.BlobHashes != nil || defaultType == types.BlobTxType:
|
case args.BlobHashes != nil || defaultType == types.BlobTxType:
|
||||||
usedType = types.BlobTxType
|
usedType = types.BlobTxType
|
||||||
case args.MaxFeePerGas != nil || defaultType == types.DynamicFeeTxType:
|
case args.MaxFeePerGas != nil || defaultType == types.DynamicFeeTxType:
|
||||||
usedType = types.DynamicFeeTxType
|
usedType = types.DynamicFeeTxType
|
||||||
case args.AccessList != nil || defaultType == types.AccessListTxType:
|
case args.AccessList != nil || defaultType == types.AccessListTxType:
|
||||||
usedType = types.AccessListTxType
|
usedType = types.AccessListTxType
|
||||||
}
|
}
|
||||||
if args.GasPrice != nil {
|
if args.GasPrice != nil {
|
||||||
usedType = types.LegacyTxType
|
usedType = types.LegacyTxType
|
||||||
}
|
}
|
||||||
return usedType
|
return usedType
|
||||||
}
|
}
|
||||||
|
|
||||||
// from retrieves the transaction sender address.
|
// from retrieves the transaction sender address.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue