aboutsummaryrefslogtreecommitdiffstats
path: root/chain/chain_manager.go
diff options
context:
space:
mode:
Diffstat (limited to 'chain/chain_manager.go')
-rw-r--r--chain/chain_manager.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/chain/chain_manager.go b/chain/chain_manager.go
index 710d96bef..df390a4c0 100644
--- a/chain/chain_manager.go
+++ b/chain/chain_manager.go
@@ -206,7 +206,7 @@ func (bc *ChainManager) add(block *Block) {
ethutil.Config.Db.Put(block.Hash(), encodedBlock)
ethutil.Config.Db.Put([]byte("LastBlock"), encodedBlock)
- chainlogger.Infof("Imported block #%d (%x...)\n", block.Number, block.Hash()[0:4])
+ //chainlogger.Infof("Imported block #%d (%x...)\n", block.Number, block.Hash()[0:4])
}
func (self *ChainManager) CalcTotalDiff(block *Block) (*big.Int, error) {
@@ -333,6 +333,12 @@ func (self *ChainManager) InsertChain(chain *BlockChain) {
self.Ethereum.EventMux().Post(NewBlockEvent{link.block})
self.Ethereum.EventMux().Post(link.messages)
}
+
+ b, e := chain.Front(), chain.Back()
+ if b != nil && e != nil {
+ front, back := b.Value.(*link).block, e.Value.(*link).block
+ chainlogger.Infof("Imported %d blocks. #%v (%x) / %#v (%x)", chain.Len(), front.Number, front.Hash()[0:4], back.Number, back.Hash()[0:4])
+ }
}
func (self *ChainManager) TestChain(chain *BlockChain) (td *big.Int, err error) {