diff options
Diffstat (limited to 'les')
-rw-r--r-- | les/api_backend.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/les/api_backend.go b/les/api_backend.go index dea33c470..4232d3ae0 100644 --- a/les/api_backend.go +++ b/les/api_backend.go @@ -60,10 +60,13 @@ func (b *LesApiBackend) HeaderByNumber(ctx context.Context, blockNr rpc.BlockNum if blockNr == rpc.LatestBlockNumber || blockNr == rpc.PendingBlockNumber { return b.eth.blockchain.CurrentHeader(), nil } - return b.eth.blockchain.GetHeaderByNumberOdr(ctx, uint64(blockNr)) } +func (b *LesApiBackend) HeaderByHash(ctx context.Context, hash common.Hash) (*types.Header, error) { + return b.eth.blockchain.GetHeaderByHash(hash), nil +} + func (b *LesApiBackend) BlockByNumber(ctx context.Context, blockNr rpc.BlockNumber) (*types.Block, error) { header, err := b.HeaderByNumber(ctx, blockNr) if header == nil || err != nil { |