consensus: handle justification sync for blocks authored locally (#8698)

* consensus: add trait to control justification sync process

* network: implement JustificationSyncLink for NetworkService

* slots: handle justification sync in slot worker

* babe: fix slot worker instantiation

* aura: fix slot worker instantiation

* pow: handle justification sync in miner

* babe: fix tests

* aura: fix tests

* node: fix compilation

* node-template: fix compilation

* consensus: rename justification sync link parameter

* aura: fix test compilation

* consensus: slots: move JustificationSyncLink out of on_slot
This commit is contained in:
André Silva
2021-06-04 22:31:06 +01:00
committed by GitHub
parent a477d4dadf
commit c44b552d8f
13 changed files with 228 additions and 70 deletions
+5
View File
@@ -966,6 +966,11 @@ impl<B: BlockT> Protocol<B> {
self.sync.request_justification(&hash, number)
}
/// Clear all pending justification requests.
pub fn clear_justification_requests(&mut self) {
self.sync.clear_justification_requests();
}
/// Request syncing for the given block from given set of peers.
/// Uses `protocol` to queue a new block download request and tries to dispatch all pending
/// requests.