sync: process empty response for justification requests (#4957)

* sync: process empty response for justification request

* sync: add test for justification request empty response

* network: remove deprecated comment
This commit is contained in:
André Silva
2020-02-18 14:11:44 +00:00
committed by GitHub
parent af493e46eb
commit 9cc650d91c
3 changed files with 118 additions and 9 deletions
@@ -228,6 +228,18 @@ impl<B: BlockT> ExtraRequests<B> {
true
}
/// Returns an iterator over all active (in-flight) requests and associated peer id.
#[cfg(test)]
pub(crate) fn active_requests(&self) -> impl Iterator<Item = (&PeerId, &ExtraRequest<B>)> {
self.active_requests.iter()
}
/// Returns an iterator over all scheduled pending requests.
#[cfg(test)]
pub(crate) fn pending_requests(&self) -> impl Iterator<Item = &ExtraRequest<B>> {
self.pending_requests.iter()
}
}
/// Matches peers with pending extra requests.