From 6253aa2fecea0c0a9598616532d858fe5a4fc93b Mon Sep 17 00:00:00 2001 From: UdjinM6 Date: Tue, 7 Nov 2023 16:41:27 +0300 Subject: [PATCH] chore: only report "bad" connection when it's actually bad (#5680) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Issue being fixed or feature implemented Having ` is not connected to us, badConnection=0` doesn't help when we don't expect it to be connected 🤷‍♂️ ## What was done? ## How Has This Been Tested? ## Breaking Changes n/a ## Checklist: - [x] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have added or updated relevant unit/integration/functional/e2e tests - [ ] I have made corresponding changes to the documentation - [x] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_ --- src/llmq/dkgsession.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/llmq/dkgsession.cpp b/src/llmq/dkgsession.cpp index 052df49d7a..9ade59ad36 100644 --- a/src/llmq/dkgsession.cpp +++ b/src/llmq/dkgsession.cpp @@ -457,7 +457,9 @@ void CDKGSession::VerifyConnectionAndMinProtoVersions() const } if (auto it = protoMap.find(m->dmn->proTxHash); it == protoMap.end()) { m->badConnection = fShouldAllMembersBeConnected; - logger.Batch("%s is not connected to us, badConnection=%b", m->dmn->proTxHash.ToString(), m->badConnection); + if (m->badConnection) { + logger.Batch("%s is not connected to us, badConnection=1", m->dmn->proTxHash.ToString()); + } } else if (it->second < MIN_MASTERNODE_PROTO_VERSION) { m->badConnection = true; logger.Batch("%s does not have min proto version %d (has %d)", m->dmn->proTxHash.ToString(), MIN_MASTERNODE_PROTO_VERSION, it->second);