From 7b39cc83cc5dcbcab6b2c35b81ea593628bbdb1f Mon Sep 17 00:00:00 2001 From: zelig Date: Sun, 14 Dec 2014 19:30:32 +0000 Subject: [PATCH] adapt chain_manager to eth protocol interface - add Status() to return td, currentblock hash, genesis hash - GetChainHashesFromHash -> GetBlockHashesFromHash --- core/chain_manager.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/chain_manager.go b/core/chain_manager.go index f9fb3b3f8..9ed2c1c42 100644 --- a/core/chain_manager.go +++ b/core/chain_manager.go @@ -137,6 +137,10 @@ func (bc *ChainManager) NewBlock(coinbase []byte) *types.Block { return block } +func (self *ChainManager) Status() (td *big.Int, currentBlock []byte, genesisBlock []byte) { + return self.TD, self.CurrentBlock.Hash(), self.Genesis().Hash() +} + func (bc *ChainManager) Reset() { AddTestNetFunds(bc.genesisBlock)