mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-31 07:31:02 +00:00
Vstaging statement distribution omnibus (#1436)
in-progress PR adding new tests and solving bugs --------- Co-authored-by: Bradley Olson <34992650+BradleyOlson64@users.noreply.github.com> Co-authored-by: eskimor <eskimor@no-such-url.com> Co-authored-by: eskimor <eskimor@users.noreply.github.com> Co-authored-by: Andrei Sandu <54316454+sandreim@users.noreply.github.com>
This commit is contained in:
@@ -331,6 +331,13 @@ impl ClusterTracker {
|
||||
self.validator_seconded(validator, candidate_hash)
|
||||
}
|
||||
|
||||
/// Whether a validator can request a candidate from us.
|
||||
pub fn can_request(&self, target: ValidatorIndex, candidate_hash: CandidateHash) -> bool {
|
||||
self.validators.contains(&target) &&
|
||||
self.we_sent_seconded(target, candidate_hash) &&
|
||||
!self.they_sent_seconded(target, candidate_hash)
|
||||
}
|
||||
|
||||
/// Returns a Vec of pending statements to be sent to a particular validator
|
||||
/// index. `Seconded` statements are sorted to the front of the vector.
|
||||
///
|
||||
|
||||
Reference in New Issue
Block a user