Skip to content

Commit

Permalink
Do not start a signing round if we haven't first set the aggregate pu…
Browse files Browse the repository at this point in the history
…blic key

Signed-off-by: Jacinta Ferrant <[email protected]>
  • Loading branch information
jferrant committed Oct 4, 2023
1 parent c2d026a commit 3aed47b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/state_machine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,10 @@ pub mod coordinator {
is_taproot: bool,
merkle_root: Option<MerkleRoot>,
) -> Result<Packet, Error> {
// We cannot sign if we haven't first set DKG (either manually or via DKG round).
if self.aggregate_public_key.is_none() {
return Err(Error::MissingAggregatePublicKey);
}
self.current_sign_id = self.current_sign_id.wrapping_add(1);
info!("Starting signing round {}", self.current_sign_id);
self.move_to(State::NonceRequest(is_taproot, merkle_root))?;
Expand Down

0 comments on commit 3aed47b

Please sign in to comment.