Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
internal/ethapi: EstimateGas should use LatestBlockNumber by default (#…
…20) ### Description upstream PR: [go-ethereum#24363](ethereum/go-ethereum#24363) We met a problem that if the `args TransactionArgs` depends on the latest committed block N, `PendingBlockNumber` is still N-1, which causes the estimation to fail. `LatestBlockNumber` is a better default value IMO. ethereum/go-ethereum#24363 (comment) : ``` if use pendingblocknumber,then in code: block, err := b.BlockByNumberOrHash(ctx, blockNrOrHash) you may get error or "block not found". ```
- Loading branch information