Skip to content

Commit a8f7965

Browse files
authored
internal/ethapi: fix outdated comments (#32751)
Fix outdated comments
1 parent b1eb33c commit a8f7965

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

internal/ethapi/api.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -460,10 +460,10 @@ func decodeHash(s string) (h common.Hash, inputLength int, err error) {
460460
}
461461

462462
// GetHeaderByNumber returns the requested canonical block header.
463-
// - When blockNr is -1 the chain pending header is returned.
464-
// - When blockNr is -2 the chain latest header is returned.
465-
// - When blockNr is -3 the chain finalized header is returned.
466-
// - When blockNr is -4 the chain safe header is returned.
463+
// - When number is -1 the chain pending header is returned.
464+
// - When number is -2 the chain latest header is returned.
465+
// - When number is -3 the chain finalized header is returned.
466+
// - When number is -4 the chain safe header is returned.
467467
func (api *BlockChainAPI) GetHeaderByNumber(ctx context.Context, number rpc.BlockNumber) (map[string]interface{}, error) {
468468
header, err := api.b.HeaderByNumber(ctx, number)
469469
if header != nil && err == nil {
@@ -489,10 +489,10 @@ func (api *BlockChainAPI) GetHeaderByHash(ctx context.Context, hash common.Hash)
489489
}
490490

491491
// GetBlockByNumber returns the requested canonical block.
492-
// - When blockNr is -1 the chain pending block is returned.
493-
// - When blockNr is -2 the chain latest block is returned.
494-
// - When blockNr is -3 the chain finalized block is returned.
495-
// - When blockNr is -4 the chain safe block is returned.
492+
// - When number is -1 the chain pending block is returned.
493+
// - When number is -2 the chain latest block is returned.
494+
// - When number is -3 the chain finalized block is returned.
495+
// - When number is -4 the chain safe block is returned.
496496
// - When fullTx is true all transactions in the block are returned, otherwise
497497
// only the transaction hash is returned.
498498
func (api *BlockChainAPI) GetBlockByNumber(ctx context.Context, number rpc.BlockNumber, fullTx bool) (map[string]interface{}, error) {

0 commit comments

Comments
 (0)