mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 10:22:23 +00:00
move tx type detection check
This commit is contained in:
parent
1a28a17b66
commit
115117c682
2 changed files with 5 additions and 8 deletions
|
|
@ -167,12 +167,7 @@ func (mc *multicall) execute(ctx context.Context, opts mcOpts) ([]mcBlockResult,
|
|||
if err := mc.sanitizeCall(&call, state, &gasUsed, blockContext); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
// Default to dynamic-fee transaction type.
|
||||
type2 := true
|
||||
if call.GasPrice != nil {
|
||||
type2 = false
|
||||
}
|
||||
tx := call.ToTransaction(type2)
|
||||
tx := call.ToTransaction()
|
||||
txes[i] = tx
|
||||
// TODO: repair log block hashes post execution.
|
||||
vmConfig := &vm.Config{
|
||||
|
|
|
|||
|
|
@ -366,7 +366,9 @@ func (args *TransactionArgs) toTransaction(type2 bool) *types.Transaction {
|
|||
}
|
||||
|
||||
// ToTransaction converts the arguments to a transaction.
|
||||
// It defaults to a dynamic fee transaction unless legacy gas price
|
||||
// is explicitly provided.
|
||||
// This assumes that setDefaults has been called.
|
||||
func (args *TransactionArgs) ToTransaction(type2 bool) *types.Transaction {
|
||||
return args.toTransaction(type2)
|
||||
func (args *TransactionArgs) ToTransaction() *types.Transaction {
|
||||
return args.toTransaction(args.GasPrice == nil)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue