Skip to content

Commit

Permalink
statement-distribution: Fix false warning (#4727)
Browse files Browse the repository at this point in the history
... when backing group is of size 1.

Signed-off-by: Alexandru Gheorghe <alexandru.gheorghe@parity.io>
  • Loading branch information
alexggh committed Jun 7, 2024
1 parent 426956f commit 2a89cc2
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,9 @@ impl ClusterTracker {

pub fn warn_if_too_many_pending_statements(&self, parent_hash: Hash) {
if self.pending.iter().filter(|pending| !pending.1.is_empty()).count() >=
self.validators.len()
self.validators.len() &&
// No reason to warn if we are the only node in the cluster.
self.validators.len() > 1
{
gum::warn!(
target: LOG_TARGET,
Expand Down

0 comments on commit 2a89cc2

Please sign in to comment.