Fixed Public block creation. Added block logging

This commit is contained in:
obscuren
2014-05-21 12:09:28 +02:00
parent 07fe00c466
commit 05e4e97276
2 changed files with 14 additions and 13 deletions

View File

@ -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 {