adapt chain_manager to eth protocol interface

- add Status() to return td, currentblock hash, genesis hash
- GetChainHashesFromHash -> GetBlockHashesFromHash
This commit is contained in:
zelig 2014-12-14 19:30:32 +00:00
parent 01dc1c1394
commit 7b39cc83cc
1 changed files with 4 additions and 0 deletions

View File

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