diff options
author | Jimmy Hu <jimmy.hu@dexon.org> | 2019-03-29 14:28:17 +0800 |
---|---|---|
committer | Wei-Ning Huang <w@byzantine-lab.io> | 2019-06-15 22:09:55 +0800 |
commit | 7f51740c91641f64a4b8e302225299ad87742c42 (patch) | |
tree | 8d35ce549e165ad33dabb07911685b7f3c8bf73a /dex/peer.go | |
parent | 038552acaa883a6353c54274f80cb888fb23be68 (diff) | |
download | go-tangerine-7f51740c91641f64a4b8e302225299ad87742c42.tar go-tangerine-7f51740c91641f64a4b8e302225299ad87742c42.tar.gz go-tangerine-7f51740c91641f64a4b8e302225299ad87742c42.tar.bz2 go-tangerine-7f51740c91641f64a4b8e302225299ad87742c42.tar.lz go-tangerine-7f51740c91641f64a4b8e302225299ad87742c42.tar.xz go-tangerine-7f51740c91641f64a4b8e302225299ad87742c42.tar.zst go-tangerine-7f51740c91641f64a4b8e302225299ad87742c42.zip |
core: fix forget connection in resetDKG (#314)
Diffstat (limited to 'dex/peer.go')
-rw-r--r-- | dex/peer.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/dex/peer.go b/dex/peer.go index d3650d00d..d0e717233 100644 --- a/dex/peer.go +++ b/dex/peer.go @@ -922,7 +922,18 @@ func (ps *peerSet) BuildConnection(round uint64) { ps.buildGroupConn(notaryLabel) } } +} + +func (ps *peerSet) ForgetLabelConnection(label peerLabel) { + ps.lock.Lock() + defer ps.lock.Unlock() + log.Debug("Forget label connection", "label", label) + ps.forgetDirectConn(label) + ps.forgetGroupConn(label) + delete(ps.directConn, label) + delete(ps.groupConnPeers, label) + delete(ps.label2Nodes, label) } func (ps *peerSet) ForgetConnection(round uint64) { |