Skip to content

Commit

Permalink
return error if we're in DkgPublicDistribute during process_message loop
Browse files Browse the repository at this point in the history
  • Loading branch information
xoloki committed Oct 10, 2024
1 parent 64dd754 commit 06b1e89
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/state_machine/coordinator/fire.rs
Original file line number Diff line number Diff line change
Expand Up @@ -249,10 +249,7 @@ impl<Aggregator: AggregatorTrait> Coordinator<Aggregator> {
return Ok((None, None));
}
State::DkgPublicDistribute => {
// XXX does this ever happen? start_dkg_round should call start_public_shares
//panic!("Got message in DkgPublicDistribute");
let packet = self.start_public_shares(false)?;
return Ok((Some(packet), None));
return Err(Error::BadStateChange("should never be in ephemeral DkgPublicDistribute during process_message loop".to_string()));
}
State::DkgPublicGather => {
self.gather_public_shares(packet)?;
Expand Down

0 comments on commit 06b1e89

Please sign in to comment.