Skip to content

Commit

Permalink
fix: prevent registering signers if registration round is closed
Browse files Browse the repository at this point in the history
  • Loading branch information
dlachaume committed May 16, 2024
1 parent 17dfb99 commit 7e001c6
Showing 1 changed file with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,14 @@ pub async fn bootstrap_aggregator(

restart_aggregator_and_move_one_epoch_forward(&mut aggregator, current_epoch, args).await?;

fake_signer::try_register_signer_until_registration_round_is_open(
&aggregator,
&signers_fixture.signers()[0],
*current_epoch + 1,
Duration::from_secs(60),
)
.await?;

info!(">> Send the Signer Key Registrations payloads for the genesis signers");
let errors = fake_signer::register_signers_to_aggregator(
&aggregator,
Expand All @@ -69,6 +77,14 @@ pub async fn bootstrap_aggregator(
.await?;
assert_eq!(0, errors);

fake_signer::try_register_signer_until_registration_round_is_open(
&aggregator,
&signers_fixture.signers()[0],
*current_epoch + 1,
Duration::from_secs(60),
)
.await?;

restart_aggregator_and_move_one_epoch_forward(&mut aggregator, current_epoch, args).await?;

info!(">> Send the Signer Key Registrations payloads for next genesis signers");
Expand Down

0 comments on commit 7e001c6

Please sign in to comment.