aboutsummaryrefslogtreecommitdiffstats
path: root/core/chain_manager.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-06-03 19:14:06 +0800
committerobscuren <geffobscura@gmail.com>2015-06-04 04:39:17 +0800
commit770a0e78396d66dc0b15a267891ed69be1414f52 (patch)
treefeb88a9ad7352bfb422bba11d6c066c9487575f0 /core/chain_manager.go
parentb26f5e0bb7e8922c80bc3513d1ebce2c99a081f5 (diff)
downloaddexon-770a0e78396d66dc0b15a267891ed69be1414f52.tar.gz
dexon-770a0e78396d66dc0b15a267891ed69be1414f52.tar.zst
dexon-770a0e78396d66dc0b15a267891ed69be1414f52.zip
wip
Diffstat (limited to 'core/chain_manager.go')
-rw-r--r--core/chain_manager.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/core/chain_manager.go b/core/chain_manager.go
index 927055103..d58c0d504 100644
--- a/core/chain_manager.go
+++ b/core/chain_manager.go
@@ -560,6 +560,7 @@ func (self *ChainManager) InsertChain(chain types.Blocks) (int, error) {
defer close(nonceQuit)
for i, block := range chain {
+ bstart := time.Now()
// Wait for block i's nonce to be verified before processing
// its state transition.
for nonceChecked[i] {
@@ -642,11 +643,11 @@ func (self *ChainManager) InsertChain(chain types.Blocks) (int, error) {
queueEvent.canonicalCount++
if glog.V(logger.Debug) {
- glog.Infof("[%v] inserted block #%d (%d TXs %d UNCs) (%x...)\n", time.Now().UnixNano(), block.Number(), len(block.Transactions()), len(block.Uncles()), block.Hash().Bytes()[0:4])
+ glog.Infof("[%v] inserted block #%d (%d TXs %d UNCs) (%x...). Took %v\n", time.Now().UnixNano(), block.Number(), len(block.Transactions()), len(block.Uncles()), block.Hash().Bytes()[0:4], time.Since(bstart))
}
} else {
if glog.V(logger.Detail) {
- glog.Infof("inserted forked block #%d (TD=%v) (%d TXs %d UNCs) (%x...)\n", block.Number(), block.Difficulty(), len(block.Transactions()), len(block.Uncles()), block.Hash().Bytes()[0:4])
+ glog.Infof("inserted forked block #%d (TD=%v) (%d TXs %d UNCs) (%x...). Took %v\n", block.Number(), block.Difficulty(), len(block.Transactions()), len(block.Uncles()), block.Hash().Bytes()[0:4], time.Since(bstart))
}
queue[i] = ChainSideEvent{block, logs}