Skip to content

Commit

Permalink
Make sure the signer set in the test matches
Browse files Browse the repository at this point in the history
  • Loading branch information
djordon committed Oct 11, 2024
1 parent 0e1eee9 commit b1c6c8a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion signer/src/testing/transaction_signer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -402,11 +402,13 @@ where
let signer_private_key = signer_info.first().unwrap().signer_private_key.to_bytes();
let dummy_aggregate_key = PublicKey::from_private_key(&PrivateKey::new(&mut rng));

let signer_set = signer_info.first().unwrap().signer_public_keys.clone();
store_dummy_dkg_shares(
&mut rng,
&signer_private_key,
&handle.context.get_storage_mut(),
dummy_aggregate_key,
signer_set,
)
.await;

Expand Down Expand Up @@ -848,12 +850,15 @@ async fn store_dummy_dkg_shares<R, S>(
signer_private_key: &[u8; 32],
storage: &S,
group_key: PublicKey,
signer_set: BTreeSet<PublicKey>,
) where
R: rand::CryptoRng + rand::RngCore,
S: storage::DbWrite,
{
let shares =
let mut shares =
testing::dummy::encrypted_dkg_shares(&fake::Faker, rng, signer_private_key, group_key);
shares.signer_set_public_keys = signer_set.into_iter().collect();

storage
.write_encrypted_dkg_shares(&shares)
.await
Expand Down

0 comments on commit b1c6c8a

Please sign in to comment.