aboutsummaryrefslogtreecommitdiffstats
path: root/dex/blockproposer.go
diff options
context:
space:
mode:
authorSonic <sonic@dexon.org>2019-03-18 08:43:39 +0800
committerWei-Ning Huang <w@dexon.org>2019-04-09 21:32:58 +0800
commit74c022a7679cb03a5ad027dc659e723638ff6a78 (patch)
treee7e2da6913d7a4e076e4fa4ade9bada6e01a0fcb /dex/blockproposer.go
parent829d04922ade426eee1302753fe1bbf34abc11db (diff)
downloaddexon-74c022a7679cb03a5ad027dc659e723638ff6a78.tar.gz
dexon-74c022a7679cb03a5ad027dc659e723638ff6a78.tar.zst
dexon-74c022a7679cb03a5ad027dc659e723638ff6a78.zip
p2p, dex: add debug log (#269)
Diffstat (limited to 'dex/blockproposer.go')
-rw-r--r--dex/blockproposer.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/dex/blockproposer.go b/dex/blockproposer.go
index 58e6eafee..b51c9d10b 100644
--- a/dex/blockproposer.go
+++ b/dex/blockproposer.go
@@ -156,6 +156,7 @@ Loop:
blocks := blocksToSync(coreHeight, currentBlock.NumberU64())
if len(blocks) == 0 {
+ log.Debug("No new block to sync", "current", currentBlock.NumberU64())
break Loop
}
b.watchCat.Feed(blocks[len(blocks)-1].Position)
@@ -164,6 +165,7 @@ Loop:
"first", blocks[0].Finalization.Height,
"last", blocks[len(blocks)-1].Finalization.Height)
if _, err := consensusSync.SyncBlocks(blocks, false); err != nil {
+ log.Debug("SyncBlocks fail", "err", err)
return nil, err
}
coreHeight = blocks[len(blocks)-1].Finalization.Height
@@ -182,6 +184,8 @@ Loop:
sub := b.dex.blockchain.SubscribeChainHeadEvent(ch)
defer sub.Unsubscribe()
+ log.Debug("Listen chain head event until synced")
+
// Listen chain head event until synced.
ListenLoop:
for {