diff --git a/src/state_machine/signer/mod.rs b/src/state_machine/signer/mod.rs index 83b0ce98..b5b57bc4 100644 --- a/src/state_machine/signer/mod.rs +++ b/src/state_machine/signer/mod.rs @@ -306,7 +306,7 @@ impl Signer { /// do we have all DkgPublicShares and DkgPrivateShares? pub fn can_dkg_end(&self) -> bool { - info!( + debug!( "can_dkg_end state {:?} DkgPrivateBegin {} DkgEndBegin {}", self.state, self.dkg_private_begin_msg.is_some(), @@ -325,7 +325,7 @@ impl Signer { if let Some(dkg_end_begin) = &self.dkg_end_begin_msg { // need private shares from active signers - for signer_id in &dkg_private_begin.signer_ids { + for signer_id in &dkg_end_begin.signer_ids { if !self.dkg_private_shares.contains_key(&signer_id) { info!("can_dkg_end: private shares missing {} false", signer_id); return false; @@ -337,7 +337,7 @@ impl Signer { } } } else { - info!("can_dkg_end: bad state {:?} false", self.state); + debug!("can_dkg_end: bad state {:?} false", self.state); return false; } false diff --git a/src/v2.rs b/src/v2.rs index a72cf545..bf95d882 100644 --- a/src/v2.rs +++ b/src/v2.rs @@ -133,7 +133,7 @@ impl Party { /// Get the shares of this party's private polynomial for all keys pub fn get_shares(&self) -> HashMap { let mut shares = HashMap::new(); - for i in 0..self.num_keys { + for i in 1..self.num_keys + 1 { shares.insert(i, self.f.eval(compute::id(i))); } shares @@ -466,6 +466,7 @@ impl traits::Signer for Party { for key_id in self.get_key_ids() { let mut shares = HashMap::new(); for (signer_id, signer_shares) in private_shares.iter() { + println!("{signer_id} {}", key_id); shares.insert(*signer_id, signer_shares[&key_id]); } key_shares.insert(key_id, shares);