mirror of
https://github.com/serai-dex/serai.git
synced 2024-11-17 01:17:36 +00:00
Add testing for Completed to coordinator e2e tests
Two commits ago stubbed in support, sufficient for a honest-validator environment.
This commit is contained in:
parent
c9b2490ab9
commit
775353f8cd
1 changed files with 24 additions and 1 deletions
|
@ -149,7 +149,30 @@ pub async fn sign<C: Ciphersuite>(
|
|||
);
|
||||
}
|
||||
|
||||
// TODO: Completed flow
|
||||
// Send Completed
|
||||
for i in participants.clone() {
|
||||
let processor = &mut processors[i];
|
||||
processor
|
||||
.send_message(messages::sign::ProcessorMessage::Completed {
|
||||
key: id.key.clone(),
|
||||
id: id.id,
|
||||
tx: b"signed_tx".to_vec(),
|
||||
})
|
||||
.await;
|
||||
}
|
||||
wait_for_tributary().await;
|
||||
|
||||
// Make sure every processor gets Completed
|
||||
for processor in processors {
|
||||
assert_eq!(
|
||||
processor.recv_message().await,
|
||||
CoordinatorMessage::Sign(messages::sign::CoordinatorMessage::Completed {
|
||||
key: id.key.clone(),
|
||||
id: id.id,
|
||||
tx: b"signed_tx".to_vec()
|
||||
})
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
|
|
Loading…
Reference in a new issue