diff options
author | zelig <viktor.tron@gmail.com> | 2014-12-15 03:30:32 +0800 |
---|---|---|
committer | zelig <viktor.tron@gmail.com> | 2014-12-15 04:45:12 +0800 |
commit | 7b39cc83cc5dcbcab6b2c35b81ea593628bbdb1f (patch) | |
tree | f2585b62c7dce7d56eb749b842f72b599cfabf34 /core | |
parent | 01dc1c13942867d0579f5010a560da4073ece05e (diff) | |
download | dexon-7b39cc83cc5dcbcab6b2c35b81ea593628bbdb1f.tar.gz dexon-7b39cc83cc5dcbcab6b2c35b81ea593628bbdb1f.tar.zst dexon-7b39cc83cc5dcbcab6b2c35b81ea593628bbdb1f.zip |
adapt chain_manager to eth protocol interface
- add Status() to return td, currentblock hash, genesis hash
- GetChainHashesFromHash -> GetBlockHashesFromHash
Diffstat (limited to 'core')
-rw-r--r-- | core/chain_manager.go | 4 |
1 files changed, 4 insertions, 0 deletions
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) |