mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-23 17:51:09 +00:00
Refactor candidate validation messages (#2219)
This commit is contained in:
@@ -535,7 +535,11 @@ async fn initiate_precheck(
|
||||
|
||||
let (tx, rx) = oneshot::channel();
|
||||
sender
|
||||
.send_message(CandidateValidationMessage::PreCheck(relay_parent, validation_code_hash, tx))
|
||||
.send_message(CandidateValidationMessage::PreCheck {
|
||||
relay_parent,
|
||||
validation_code_hash,
|
||||
response_sender: tx,
|
||||
})
|
||||
.await;
|
||||
|
||||
let timer = metrics.time_pre_check_judgement();
|
||||
|
||||
@@ -267,11 +267,12 @@ impl TestState {
|
||||
handle: &mut VirtualOverseer,
|
||||
) -> ExpectCandidatePrecheck {
|
||||
match self.recv_timeout(handle).await.expect("timeout waiting for a message") {
|
||||
AllMessages::CandidateValidation(CandidateValidationMessage::PreCheck(
|
||||
AllMessages::CandidateValidation(CandidateValidationMessage::PreCheck {
|
||||
relay_parent,
|
||||
validation_code_hash,
|
||||
tx,
|
||||
)) => ExpectCandidatePrecheck { relay_parent, validation_code_hash, tx },
|
||||
response_sender,
|
||||
..
|
||||
}) => ExpectCandidatePrecheck { relay_parent, validation_code_hash, tx: response_sender },
|
||||
msg => panic!("Unexpected message was received: {:#?}", msg),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user