diff --git a/coordinator/src/tests/tributary/dkg.rs b/coordinator/src/tests/tributary/dkg.rs index a3c6643e..90ad1f24 100644 --- a/coordinator/src/tests/tributary/dkg.rs +++ b/coordinator/src/tests/tributary/dkg.rs @@ -281,9 +281,13 @@ async fn dkg_test() { let key_pair = (serai_client::Public(substrate_key), network_key.try_into().unwrap()); let mut txs = vec![]; - for key in keys.iter() { + for (i, key) in keys.iter().enumerate() { let attempt = 0; - let (mut scanner_db, _) = new_processors(key, &spec, &tributaries[0].1).await; + let mut scanner_db = &mut scanner_db; + let (mut local_scanner_db, _) = new_processors(key, &spec, &tributaries[0].1).await; + if i != 0 { + scanner_db = &mut local_scanner_db; + } let mut txn = scanner_db.0.txn(); let share = crate::tributary::generated_key_pair::(&mut txn, key, &spec, &key_pair, 0).unwrap();