diff options
author | Taylor Gerring <taylor.gerring@gmail.com> | 2015-03-26 17:14:52 +0800 |
---|---|---|
committer | Taylor Gerring <taylor.gerring@gmail.com> | 2015-03-26 17:14:52 +0800 |
commit | c7dc379da5a02fb8ac92788fa317379fbde00d20 (patch) | |
tree | d24ca050c0292cc8923af84da0ac236f4989fddb /xeth/xeth.go | |
parent | 7e1e264375fe4bebbf6bb40604d0060744ebae2a (diff) | |
download | dexon-c7dc379da5a02fb8ac92788fa317379fbde00d20.tar.gz dexon-c7dc379da5a02fb8ac92788fa317379fbde00d20.tar.zst dexon-c7dc379da5a02fb8ac92788fa317379fbde00d20.zip |
GetBlockByHashArgs
Diffstat (limited to 'xeth/xeth.go')
-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 { |