@@ -460,10 +460,10 @@ func decodeHash(s string) (h common.Hash, inputLength int, err error) {
460
460
}
461
461
462
462
// 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.
467
467
func (api * BlockChainAPI ) GetHeaderByNumber (ctx context.Context , number rpc.BlockNumber ) (map [string ]interface {}, error ) {
468
468
header , err := api .b .HeaderByNumber (ctx , number )
469
469
if header != nil && err == nil {
@@ -489,10 +489,10 @@ func (api *BlockChainAPI) GetHeaderByHash(ctx context.Context, hash common.Hash)
489
489
}
490
490
491
491
// 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.
496
496
// - When fullTx is true all transactions in the block are returned, otherwise
497
497
// only the transaction hash is returned.
498
498
func (api * BlockChainAPI ) GetBlockByNumber (ctx context.Context , number rpc.BlockNumber , fullTx bool ) (map [string ]interface {}, error ) {
0 commit comments