From 06b1e89390703170682d0a97c8af4144f416dbee Mon Sep 17 00:00:00 2001 From: Joey Yandle Date: Thu, 10 Oct 2024 12:51:22 -0400 Subject: [PATCH] return error if we're in DkgPublicDistribute during process_message loop --- src/state_machine/coordinator/fire.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/state_machine/coordinator/fire.rs b/src/state_machine/coordinator/fire.rs index 23ea4e8..25fe350 100644 --- a/src/state_machine/coordinator/fire.rs +++ b/src/state_machine/coordinator/fire.rs @@ -249,10 +249,7 @@ impl Coordinator { 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)?;