diff options
Diffstat (limited to 'xeth')
-rw-r--r-- | xeth/xeth.go | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/xeth/xeth.go b/xeth/xeth.go index bf30fc2fc..92e73c7d5 100644 --- a/xeth/xeth.go +++ b/xeth/xeth.go @@ -160,13 +160,16 @@ func (self *XEth) BlockByHash(strHash string) *Block { return NewBlock(block) } -func (self *XEth) EthBlockByHash(strHash string) *types.Block { - hash := common.HexToHash(strHash) +func (self *XEth) EthBlockByHash(hash common.Hash) *types.Block { block := self.backend.ChainManager().GetBlock(hash) return block } +func (self *XEth) EthBlockByHexstring(strHash string) *types.Block { + return self.EthBlockByHash(common.HexToHash(strHash)) +} + func (self *XEth) EthTransactionByHash(hash string) *types.Transaction { data, _ := self.backend.ExtraDb().Get(common.FromHex(hash)) if len(data) != 0 { |