Skip to content

Drop> This variant should be checked in TransactionArgs.ToMessage. I'm surprised it's still failing. #29117

@Ger6662017

Description

@Ger6662017
          > This variant should be checked in `TransactionArgs.ToMessage`. I'm surprised it's still failing.

because of this in ToMessage:

	if args.Gas != nil {
		gas = uint64(*args.Gas)
	}

the pre-handling to set args.Gas as 0 activates this if, thus the gas limit is wrongly set as 0. code:

		tmp := hexutil.Uint64(b.RPCGasCap())
		args.Gas = &tmp

btw, which do you think is better as a default value, the block gas limit or uint64(math.MaxUint64 / 2) like in ToMessage?

Originally posted by @colinlyguo in #28846 (comment)

### Tasks
- [ ] https://github.com/ethereum/go-ethereum/pull/29115
- [ ] https://github.com/ethereum/go-ethereum/pull/29089

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions