adapt chain_manager to eth protocol interface

- add Status() to return td, currentblock hash, genesis hash
- GetChainHashesFromHash -> GetBlockHashesFromHash
poc8
zelig 10 years ago
parent 01dc1c1394
commit 7b39cc83cc
  1. 4
      core/chain_manager.go

@ -137,6 +137,10 @@ func (bc *ChainManager) NewBlock(coinbase []byte) *types.Block {
return 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() { func (bc *ChainManager) Reset() {
AddTestNetFunds(bc.genesisBlock) AddTestNetFunds(bc.genesisBlock)

Loading…
Cancel
Save