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@byzantine-lab.io>2019-06-12 17:27:23 +0800
commit671e8fb6441fef5365bc357fe27c9fda6c98f4db (patch)
tree2829e824fc972b76392b85f9940f2f08fdf38be6 /dex/blockproposer.go
parent76d5bfcaf0a4c816842b561e3b3b995c1e766d1f (diff)
downloadgo-tangerine-671e8fb6441fef5365bc357fe27c9fda6c98f4db.tar
go-tangerine-671e8fb6441fef5365bc357fe27c9fda6c98f4db.tar.gz
go-tangerine-671e8fb6441fef5365bc357fe27c9fda6c98f4db.tar.bz2
go-tangerine-671e8fb6441fef5365bc357fe27c9fda6c98f4db.tar.lz
go-tangerine-671e8fb6441fef5365bc357fe27c9fda6c98f4db.tar.xz
go-tangerine-671e8fb6441fef5365bc357fe27c9fda6c98f4db.tar.zst
go-tangerine-671e8fb6441fef5365bc357fe27c9fda6c98f4db.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 {