@@ -89,6 +89,10 @@ func (b *EthAPIBackend) BlockByNumber(ctx context.Context, number rpc.BlockNumbe
89
89
return b .eth .blockchain .GetBlockByNumber (uint64 (number )), nil
90
90
}
91
91
92
+ func (b * EthAPIBackend ) BlockByHash (ctx context.Context , hash common.Hash ) (* types.Block , error ) {
93
+ return b .eth .blockchain .GetBlockByHash (hash ), nil
94
+ }
95
+
92
96
func (b * EthAPIBackend ) StateAndHeaderByNumber (ctx context.Context , number rpc.BlockNumber ) (* state.StateDB , * types.Header , error ) {
93
97
// Pending state is only known by the miner
94
98
if number == rpc .PendingBlockNumber {
@@ -107,14 +111,6 @@ func (b *EthAPIBackend) StateAndHeaderByNumber(ctx context.Context, number rpc.B
107
111
return stateDb , header , err
108
112
}
109
113
110
- func (b * EthAPIBackend ) GetHeader (ctx context.Context , hash common.Hash ) * types.Header {
111
- return b .eth .blockchain .GetHeaderByHash (hash )
112
- }
113
-
114
- func (b * EthAPIBackend ) GetBlock (ctx context.Context , hash common.Hash ) (* types.Block , error ) {
115
- return b .eth .blockchain .GetBlockByHash (hash ), nil
116
- }
117
-
118
114
func (b * EthAPIBackend ) GetReceipts (ctx context.Context , hash common.Hash ) (types.Receipts , error ) {
119
115
return b .eth .blockchain .GetReceiptsByHash (hash ), nil
120
116
}
0 commit comments