From 520d6562f9058d07de1f9b1b97ba1ce8562dc2d2 Mon Sep 17 00:00:00 2001 From: Cassandra Heart Date: Thu, 5 Oct 2023 16:19:06 -0500 Subject: [PATCH] fix: consider message failures and timeouts to also be uncooperative --- node/consensus/ceremony/consensus_frames.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/node/consensus/ceremony/consensus_frames.go b/node/consensus/ceremony/consensus_frames.go index 67ae961..9d30732 100644 --- a/node/consensus/ceremony/consensus_frames.go +++ b/node/consensus/ceremony/consensus_frames.go @@ -930,6 +930,10 @@ func (e *CeremonyDataClockConsensusEngine) collect( "error while retrieving sync", zap.Error(err), ) + e.peerMapMx.Lock() + e.uncooperativePeersMap[string(peerId)] = e.peerMap[string(peerId)] + delete(e.peerMap, string(peerId)) + e.peerMapMx.Unlock() } else { var syncMsg *protobufs.CeremonyCompressedSync for syncMsg, err = s.Recv(); err == nil; syncMsg, err = s.Recv() {