diff options
author | Péter Szilágyi <peterke@gmail.com> | 2018-07-12 22:36:07 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2018-07-12 23:16:54 +0800 |
commit | e1f1d3085c6b868de93313700cac8a325e9b148b (patch) | |
tree | b5a2c834735e0a1405a975d3552df07aebe0e2e0 /les | |
parent | 96339daf40989072ff2a9e8b476da6698da45dc7 (diff) | |
download | dexon-e1f1d3085c6b868de93313700cac8a325e9b148b.tar dexon-e1f1d3085c6b868de93313700cac8a325e9b148b.tar.gz dexon-e1f1d3085c6b868de93313700cac8a325e9b148b.tar.bz2 dexon-e1f1d3085c6b868de93313700cac8a325e9b148b.tar.lz dexon-e1f1d3085c6b868de93313700cac8a325e9b148b.tar.xz dexon-e1f1d3085c6b868de93313700cac8a325e9b148b.tar.zst dexon-e1f1d3085c6b868de93313700cac8a325e9b148b.zip |
accounts, eth, les: blockhash based filtering on all code paths
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 { |