From 688d118c7e0d439691e84fc6e068ab3e19da5185 Mon Sep 17 00:00:00 2001 From: obscuren Date: Tue, 7 Apr 2015 14:57:04 +0200 Subject: Updated logging --- core/chain_manager.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'core/chain_manager.go') 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) -- cgit