Provisioner should ignore unconfirmed disputes (#6294)

* Fix typos

* Filter unconfirmed disputes in provisioner -  random_selection

* Rework dispute coordinator to return `DisputeStatus` with
`ActiveDisputes` message.
* Rework the random_selection implementation of `select_disptues` in
  `provisioner` to return only confirmed disputes.

* Filter unconfirmed disputes in provisioner - prioritized_selection

* Add test for unconfirmed disputes handling

* Fix `dispute-distribution` tests
This commit is contained in:
Tsvetomir Dimitrov authored and GitHub committed 2022-11-16 14:39:05 +00:00
1 parent 40221806d4
commit a0f4287dd9
8 files changed
+148 -66

No files matched your search

@@ -268,13 +268,13 @@ pub enum DisputeCoordinatorMessage {
/// - or the imported statements are backing/approval votes, which are always accepted.
pending_confirmation: Option<oneshot::Sender<ImportStatementsResult>>,
},
/// Fetch a list of all recent disputes the co-ordinator is aware of.
/// Fetch a list of all recent disputes the coordinator is aware of.
/// These are disputes which have occurred any time in recent sessions,
/// and which may have already concluded.
RecentDisputes(oneshot::Sender<Vec<(SessionIndex, CandidateHash, DisputeStatus)>>),
/// Fetch a list of all active disputes that the coordinator is aware of.
/// These disputes are either not yet concluded or recently concluded.
ActiveDisputes(oneshot::Sender<Vec<(SessionIndex, CandidateHash)>>),
ActiveDisputes(oneshot::Sender<Vec<(SessionIndex, CandidateHash, DisputeStatus)>>),
/// Get candidate votes for a candidate.
QueryCandidateVotes(
Vec<(SessionIndex, CandidateHash)>,