Skip to content

Commit e3bdd02

Browse files
committed
Implement Signer Registration Round closing
1 parent 513e09c commit e3bdd02

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

mithril-aggregator/src/signer_registerer.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,9 @@ pub trait SignerRegistrationRoundOpener: Sync + Send {
7979
registration_epoch: Epoch,
8080
stake_distribution: StakeDistribution,
8181
) -> Result<(), SignerRegistrationError>;
82+
83+
/// Close a signer registration round
84+
async fn close_registration_round(&self) -> Result<(), SignerRegistrationError>;
8285
}
8386

8487
/// Implementation of a [SignerRegisterer]
@@ -127,6 +130,13 @@ impl SignerRegistrationRoundOpener for MithrilSignerRegisterer {
127130

128131
Ok(())
129132
}
133+
134+
async fn close_registration_round(&self) -> Result<(), SignerRegistrationError> {
135+
let mut current_round = self.current_round.write().await;
136+
*current_round = None;
137+
138+
Ok(())
139+
}
130140
}
131141

132142
#[async_trait]

0 commit comments

Comments
 (0)