mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-08 12:19:24 +00:00
Correct the coordinator tests
They weren't updated with the past couple of commits.
This commit is contained in:
@@ -7,10 +7,15 @@ use std::{
|
||||
use zeroize::Zeroizing;
|
||||
use rand_core::{RngCore, OsRng};
|
||||
|
||||
use blake2::{
|
||||
digest::{consts::U32, Digest},
|
||||
Blake2b,
|
||||
};
|
||||
use ciphersuite::{group::GroupEncoding, Ciphersuite, Ristretto, Secp256k1};
|
||||
|
||||
use dkg::Participant;
|
||||
|
||||
use scale::Encode;
|
||||
|
||||
use serai_client::{
|
||||
primitives::{NetworkId, BlockHash, Signature},
|
||||
in_instructions::{
|
||||
@@ -35,6 +40,12 @@ pub async fn batch(
|
||||
attempt: 0,
|
||||
};
|
||||
|
||||
for processor in processors.iter_mut() {
|
||||
processor
|
||||
.send_message(messages::substrate::ProcessorMessage::Batch { batch: batch.clone() })
|
||||
.await;
|
||||
}
|
||||
|
||||
// Select a random participant to exclude, so we know for sure who *is* participating
|
||||
assert_eq!(COORDINATORS - THRESHOLD, 1);
|
||||
let excluded_signer =
|
||||
@@ -168,7 +179,7 @@ pub async fn batch(
|
||||
|
||||
for processor in processors.iter_mut() {
|
||||
processor
|
||||
.send_message(messages::substrate::ProcessorMessage::Update { batch: batch.clone() })
|
||||
.send_message(messages::substrate::ProcessorMessage::SignedBatch { batch: batch.clone() })
|
||||
.await;
|
||||
}
|
||||
|
||||
@@ -194,7 +205,8 @@ pub async fn batch(
|
||||
InInstructionsEvent::Batch {
|
||||
network: batch.batch.network,
|
||||
id: batch.batch.id,
|
||||
block: batch.batch.block
|
||||
block: batch.batch.block,
|
||||
instructions_hash: Blake2b::<U32>::digest(batch.batch.instructions.encode()).into(),
|
||||
}
|
||||
);
|
||||
break 'outer;
|
||||
|
||||
Reference in New Issue
Block a user