aboutsummaryrefslogtreecommitdiffstats
path: root/dex/handler.go
diff options
context:
space:
mode:
authorWei-Ning Huang <w@dexon.org>2018-11-16 17:26:50 +0800
committerWei-Ning Huang <w@dexon.org>2019-03-12 12:19:09 +0800
commitc2d461f4c5cefde85173365175d2de8bf234b4aa (patch)
treecd7a3cc61f6befa7359d18f2e6b024452b3c267d /dex/handler.go
parentdcdb39cb09464422b1ab13a0b92f95e5378431b6 (diff)
downloaddexon-c2d461f4c5cefde85173365175d2de8bf234b4aa.tar
dexon-c2d461f4c5cefde85173365175d2de8bf234b4aa.tar.gz
dexon-c2d461f4c5cefde85173365175d2de8bf234b4aa.tar.bz2
dexon-c2d461f4c5cefde85173365175d2de8bf234b4aa.tar.lz
dexon-c2d461f4c5cefde85173365175d2de8bf234b4aa.tar.xz
dexon-c2d461f4c5cefde85173365175d2de8bf234b4aa.tar.zst
dexon-c2d461f4c5cefde85173365175d2de8bf234b4aa.zip
core: fix light node synchronization issue (#30)
InsertChain() need to record the correct roundHeight mapping in order to process snapshotRoundHeight() governance method correctly.
Diffstat (limited to 'dex/handler.go')
-rw-r--r--dex/handler.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/dex/handler.go b/dex/handler.go
index 7bc9c297d..21322e4e0 100644
--- a/dex/handler.go
+++ b/dex/handler.go
@@ -1079,6 +1079,10 @@ func (pm *ProtocolManager) peerSetLoop() {
pm.BroadcastBlock(event.Block, true) // First propagate block to peers
pm.BroadcastBlock(event.Block, false) // Only then announce to the rest
+ if !pm.isBlockProposer {
+ break
+ }
+
newRound := pm.gov.LenCRS() - 1
log.Trace("new round", "round", newRound)
if newRound == round {