From 4c996c38afa56f0f4e21ed2cc44f894ed0f99cd9 Mon Sep 17 00:00:00 2001 From: Jacinta Ferrant Date: Thu, 8 Feb 2024 18:30:14 -0800 Subject: [PATCH] Do not run dkg if already have a pending vote Signed-off-by: Jacinta Ferrant --- stacks-signer/src/signer.rs | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/stacks-signer/src/signer.rs b/stacks-signer/src/signer.rs index 22f64becf..c43b3eb12 100644 --- a/stacks-signer/src/signer.rs +++ b/stacks-signer/src/signer.rs @@ -1099,7 +1099,7 @@ impl Signer { && round == self.coordinator.current_dkg_id as u128 { debug!("Signer #{}: Not triggering a DKG round. Already have a pending vote transaction for aggregate public key {point:?} for round {round}...", self.signer_id); - continue; + return Ok(()); } } else { error!("BUG: Signer #{}: Received an unrecognized transaction ({}) in an already filtered list: {transaction:?}", self.signer_id, transaction.txid()); @@ -1110,12 +1110,6 @@ impl Signer { if self.commands.back() != Some(&Command::Dkg) { self.commands.push_back(Command::Dkg); } - } else { - debug!("Signer #{}: Not triggering a DKG round.", self.signer_id; - "aggregate_public_key" => new_aggregate_public_key.is_some(), - "coordinator_id" => coordinator_id, - "coordinator_idle" => self.coordinator.state == CoordinatorState::Idle, - ); } Ok(()) }