aboutsummaryrefslogtreecommitdiffstats
path: root/eth/api_backend.go
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2018-07-12 22:36:07 +0800
committerPéter Szilágyi <peterke@gmail.com>2018-07-12 23:16:54 +0800
commite1f1d3085c6b868de93313700cac8a325e9b148b (patch)
treeb5a2c834735e0a1405a975d3552df07aebe0e2e0 /eth/api_backend.go
parent96339daf40989072ff2a9e8b476da6698da45dc7 (diff)
downloaddexon-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 'eth/api_backend.go')
-rw-r--r--eth/api_backend.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/eth/api_backend.go b/eth/api_backend.go
index 016087dfe..03f6012d7 100644
--- a/eth/api_backend.go
+++ b/eth/api_backend.go
@@ -70,6 +70,10 @@ func (b *EthAPIBackend) HeaderByNumber(ctx context.Context, blockNr rpc.BlockNum
return b.eth.blockchain.GetHeaderByNumber(uint64(blockNr)), nil
}
+func (b *EthAPIBackend) HeaderByHash(ctx context.Context, hash common.Hash) (*types.Header, error) {
+ return b.eth.blockchain.GetHeaderByHash(hash), nil
+}
+
func (b *EthAPIBackend) BlockByNumber(ctx context.Context, blockNr rpc.BlockNumber) (*types.Block, error) {
// Pending block is only known by the miner
if blockNr == rpc.PendingBlockNumber {