aboutsummaryrefslogtreecommitdiffstats
path: root/eth/api_backend.go
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2018-07-24 17:52:16 +0800
committerGitHub <noreply@github.com>2018-07-24 17:52:16 +0800
commit21c059b67ef4da979db3d66bd021a72112b35419 (patch)
tree70881528b2f4ab1b36b4892f9e92cefc753e6d55 /eth/api_backend.go
parent9e24491c65120d3fb36da45e57a0cb87c549f621 (diff)
parente1f1d3085c6b868de93313700cac8a325e9b148b (diff)
downloaddexon-21c059b67ef4da979db3d66bd021a72112b35419.tar
dexon-21c059b67ef4da979db3d66bd021a72112b35419.tar.gz
dexon-21c059b67ef4da979db3d66bd021a72112b35419.tar.bz2
dexon-21c059b67ef4da979db3d66bd021a72112b35419.tar.lz
dexon-21c059b67ef4da979db3d66bd021a72112b35419.tar.xz
dexon-21c059b67ef4da979db3d66bd021a72112b35419.tar.zst
dexon-21c059b67ef4da979db3d66bd021a72112b35419.zip
Merge pull request #16734 from reductionista/eip234
eth/filters, interfaces: EIP-234 Add blockHash option to eth_getLogs
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 {