diff options
author | obscuren <geffobscura@gmail.com> | 2015-04-07 20:57:04 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2015-04-07 20:57:04 +0800 |
commit | 688d118c7e0d439691e84fc6e068ab3e19da5185 (patch) | |
tree | 6891a60950e0c2956c9f2d4fed6fceb67430775c /core/chain_manager.go | |
parent | 01b2c90179ff82e4610745aea0e3e3ca53756305 (diff) | |
download | dexon-688d118c7e0d439691e84fc6e068ab3e19da5185.tar dexon-688d118c7e0d439691e84fc6e068ab3e19da5185.tar.gz dexon-688d118c7e0d439691e84fc6e068ab3e19da5185.tar.bz2 dexon-688d118c7e0d439691e84fc6e068ab3e19da5185.tar.lz dexon-688d118c7e0d439691e84fc6e068ab3e19da5185.tar.xz dexon-688d118c7e0d439691e84fc6e068ab3e19da5185.tar.zst dexon-688d118c7e0d439691e84fc6e068ab3e19da5185.zip |
Updated logging
Diffstat (limited to 'core/chain_manager.go')
-rw-r--r-- | core/chain_manager.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/core/chain_manager.go b/core/chain_manager.go index c2e241e90..3ab95d272 100644 --- a/core/chain_manager.go +++ b/core/chain_manager.go @@ -452,7 +452,7 @@ func (self *ChainManager) InsertChain(chain types.Blocks) error { var ( queue = make([]interface{}, len(chain)) queueEvent = queueEvent{queue: queue} - stats struct{ delayed, processed int } + stats struct{ queued, processed int } tstart = time.Now() ) for i, block := range chain { @@ -472,13 +472,13 @@ func (self *ChainManager) InsertChain(chain types.Blocks) error { // future block for future use if err == BlockFutureErr { self.futureBlocks.Push(block) - stats.delayed++ + stats.queued++ continue } if IsParentErr(err) && self.futureBlocks.Has(block.ParentHash()) { self.futureBlocks.Push(block) - stats.delayed++ + stats.queued++ continue } @@ -545,10 +545,10 @@ func (self *ChainManager) InsertChain(chain types.Blocks) error { } - if (stats.delayed > 0 || stats.processed > 0) && bool(glog.V(logger.Info)) { + if (stats.queued > 0 || stats.processed > 0) && bool(glog.V(logger.Info)) { tend := time.Since(tstart) start, end := chain[0], chain[len(chain)-1] - glog.Infof("imported %d block(s) %d delayed in %v. #%v [%x / %x]\n", stats.processed, stats.delayed, tend, end.Number(), start.Hash().Bytes()[:4], end.Hash().Bytes()[:4]) + glog.Infof("imported %d block(s) %d queued in %v. #%v [%x / %x]\n", stats.processed, stats.queued, tend, end.Number(), start.Hash().Bytes()[:4], end.Hash().Bytes()[:4]) } go self.eventMux.Post(queueEvent) |