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@byzantine-lab.io>2019-06-12 17:27:18 +0800
commitfd188f89845ea16c40c2b6af2ffa67b0f445b854 (patch)
tree9db6403388483324e6e7916fae3f8c2249f3ffdc /dex/handler.go
parent652ec743c6e05a94212745daec4c10565e57524b (diff)
downloadgo-tangerine-fd188f89845ea16c40c2b6af2ffa67b0f445b854.tar
go-tangerine-fd188f89845ea16c40c2b6af2ffa67b0f445b854.tar.gz
go-tangerine-fd188f89845ea16c40c2b6af2ffa67b0f445b854.tar.bz2
go-tangerine-fd188f89845ea16c40c2b6af2ffa67b0f445b854.tar.lz
go-tangerine-fd188f89845ea16c40c2b6af2ffa67b0f445b854.tar.xz
go-tangerine-fd188f89845ea16c40c2b6af2ffa67b0f445b854.tar.zst
go-tangerine-fd188f89845ea16c40c2b6af2ffa67b0f445b854.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 {