aboutsummaryrefslogtreecommitdiffstats
path: root/dex/handler.go
diff options
context:
space:
mode:
authorJimmy Hu <jimmy.hu@dexon.org>2019-03-29 13:00:55 +0800
committerWei-Ning Huang <w@dexon.org>2019-04-09 21:32:59 +0800
commit3489e7ec917cd00d1995cd7a0f669bfc8aff0a8e (patch)
tree8e76daebfd01d531121dcecd99e33f5ecc86748d /dex/handler.go
parent819d0520f8e6ed49c8cdc5dae1e1001aa3c0b4ac (diff)
downloaddexon-3489e7ec917cd00d1995cd7a0f669bfc8aff0a8e.tar.gz
dexon-3489e7ec917cd00d1995cd7a0f669bfc8aff0a8e.tar.zst
dexon-3489e7ec917cd00d1995cd7a0f669bfc8aff0a8e.zip
dex: fix initial build connection bug (#311)
Diffstat (limited to 'dex/handler.go')
-rw-r--r--dex/handler.go9
1 files changed, 5 insertions, 4 deletions
diff --git a/dex/handler.go b/dex/handler.go
index 6d0746d2f..161f4a4d8 100644
--- a/dex/handler.go
+++ b/dex/handler.go
@@ -1302,10 +1302,11 @@ func (pm *ProtocolManager) SetReceiveCoreMessage(enabled bool) {
// a loop keep building and maintaining peers in notary set.
// TODO: finish this
func (pm *ProtocolManager) peerSetLoop() {
- log.Debug("ProtocolManager: started peer set loop")
-
round := pm.gov.Round()
- log.Trace("ProtocolManager: startup round", "round", round)
+ resetCount := pm.gov.DKGResetCount(round)
+ log.Debug("ProtocolManager: startup round",
+ "round", round,
+ "reset", resetCount)
if round < dexCore.DKGDelayRound {
for i := round; i <= dexCore.DKGDelayRound; i++ {
@@ -1319,8 +1320,8 @@ func (pm *ProtocolManager) peerSetLoop() {
if CRSRound > round {
pm.peers.BuildConnection(CRSRound)
round = CRSRound
+ resetCount = pm.gov.DKGResetCount(round)
}
- resetCount := uint64(0)
for {
select {