diff options
author | obscuren <geffobscura@gmail.com> | 2014-05-21 18:09:28 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2014-05-21 18:09:28 +0800 |
commit | 05e4e9727675f84c5768636070b6a79beea050aa (patch) | |
tree | 0a799d16fb09ba606955de16d162fa69eec40a9e /ethpub/pub.go | |
parent | 07fe00c4661e3b96e1758598df881057c1f52b3a (diff) | |
download | go-tangerine-05e4e9727675f84c5768636070b6a79beea050aa.tar go-tangerine-05e4e9727675f84c5768636070b6a79beea050aa.tar.gz go-tangerine-05e4e9727675f84c5768636070b6a79beea050aa.tar.bz2 go-tangerine-05e4e9727675f84c5768636070b6a79beea050aa.tar.lz go-tangerine-05e4e9727675f84c5768636070b6a79beea050aa.tar.xz go-tangerine-05e4e9727675f84c5768636070b6a79beea050aa.tar.zst go-tangerine-05e4e9727675f84c5768636070b6a79beea050aa.zip |
Fixed Public block creation. Added block logging
Diffstat (limited to 'ethpub/pub.go')
-rw-r--r-- | ethpub/pub.go | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/ethpub/pub.go b/ethpub/pub.go index ec187e276..cd002b500 100644 --- a/ethpub/pub.go +++ b/ethpub/pub.go @@ -24,18 +24,9 @@ func NewPEthereum(manager ethchain.EthManager) *PEthereum { func (lib *PEthereum) GetBlock(hexHash string) *PBlock { hash := ethutil.FromHex(hexHash) - block := lib.blockChain.GetBlock(hash) - var blockInfo *PBlock - - if block != nil { - blockInfo = &PBlock{Number: int(block.BlockInfo().Number), Hash: ethutil.Hex(block.Hash())} - } else { - blockInfo = &PBlock{Number: -1, Hash: ""} - } - - return blockInfo + return NewPBlock(block) } func (lib *PEthereum) GetKey() *PKey { |