internal/ethapi: avoid using pending for defaults #28784 (#1386)

This commit is contained in:
Daniel Liu 2025-08-28 18:56:00 +08:00 committed by GitHub
parent 9fcb8f6a37
commit f561e7664d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1719,7 +1719,7 @@ type accessListResult struct {
// CreateAccessList creates a EIP-2930 type AccessList for the given transaction.
// Reexec and BlockNrOrHash can be specified to create the accessList on top of a certain state.
func (s *BlockChainAPI) CreateAccessList(ctx context.Context, args TransactionArgs, blockNrOrHash *rpc.BlockNumberOrHash) (*accessListResult, error) {
bNrOrHash := rpc.BlockNumberOrHashWithNumber(rpc.PendingBlockNumber)
bNrOrHash := rpc.BlockNumberOrHashWithNumber(rpc.LatestBlockNumber)
if blockNrOrHash != nil {
bNrOrHash = *blockNrOrHash
}