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
-2
View File
@@ -864,8 +864,6 @@ impl<B: BlockT, S: NetworkSpecialization<B>, H: ExHashT> Protocol<B, S, H> {
blocks_range
);
// TODO [andre]: move this logic to the import queue so that
// justifications are imported asynchronously (#1482)
if request.fields == message::BlockAttributes::JUSTIFICATION {
match self.sync.on_block_justification(peer, response) {
Ok(sync::OnBlockJustification::Nothing) => CustomMessageOutcome::None,