rpc: add BlockByHash to Client (#4923)

Ethermint currently has to maintain a map height-> block hash on the store (see here) as it needs to expose the eth_getBlockByHash JSON-RPC query for Web3 compatibility. This query is currently not supported by the tendermint RPC client.
This commit is contained in:
Federico Kunze
2020-06-01 09:04:45 +04:00
committed by GitHub
parent 0572315f77
commit da924fc62d
10 changed files with 103 additions and 7 deletions
+1
View File
@@ -65,6 +65,7 @@ type ABCIClient interface {
// and prove anything about the chain.
type SignClient interface {
Block(height *int64) (*ctypes.ResultBlock, error)
BlockByHash(hash []byte) (*ctypes.ResultBlock, error)
BlockResults(height *int64) (*ctypes.ResultBlockResults, error)
Commit(height *int64) (*ctypes.ResultCommit, error)
Validators(height *int64, page, perPage int) (*ctypes.ResultValidators, error)