From 05e4e9727675f84c5768636070b6a79beea050aa Mon Sep 17 00:00:00 2001 From: obscuren Date: Wed, 21 May 2014 12:09:28 +0200 Subject: Fixed Public block creation. Added block logging --- ethpub/pub.go | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'ethpub/pub.go') 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 { -- cgit v1.2.3