mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-15 06:51:07 +00:00
dispute-coordinator: Cleanup + Bug fixes (#5323)
* Make import confirmation oneshot optional. * Cleanup for further improvements. * Queue adoptions. * Fix fieldname * Use correct relay parent * Fix scraper tests. * Small optimization. * Fix all tests. * Fix other tests. * fmt * spelling * Fix warning.
This commit is contained in:
@@ -950,15 +950,12 @@ async fn handle_actions(
|
||||
dispute_statement,
|
||||
validator_index,
|
||||
} => {
|
||||
// TODO: Log confirmation results in an efficient way:
|
||||
// https://github.com/paritytech/polkadot/issues/5156
|
||||
let (pending_confirmation, _confirmation_rx) = oneshot::channel();
|
||||
ctx.send_message(DisputeCoordinatorMessage::ImportStatements {
|
||||
candidate_hash,
|
||||
candidate_receipt,
|
||||
session,
|
||||
statements: vec![(dispute_statement, validator_index)],
|
||||
pending_confirmation,
|
||||
pending_confirmation: None,
|
||||
})
|
||||
.await;
|
||||
},
|
||||
|
||||
@@ -25,7 +25,6 @@ use polkadot_node_primitives::{
|
||||
use polkadot_node_subsystem::{
|
||||
messages::{
|
||||
AllMessages, ApprovalVotingMessage, AssignmentCheckResult, AvailabilityRecoveryMessage,
|
||||
ImportStatementsResult,
|
||||
},
|
||||
ActivatedLeaf, ActiveLeavesUpdate, LeafStatus,
|
||||
};
|
||||
@@ -605,11 +604,10 @@ async fn check_and_import_approval(
|
||||
overseer_recv(overseer).await,
|
||||
AllMessages::DisputeCoordinator(DisputeCoordinatorMessage::ImportStatements {
|
||||
candidate_hash: c_hash,
|
||||
pending_confirmation,
|
||||
pending_confirmation: None,
|
||||
..
|
||||
}) => {
|
||||
assert_eq!(c_hash, candidate_hash);
|
||||
let _ = pending_confirmation.send(ImportStatementsResult::ValidImport);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user