Support synching of blocks that are not new_best (#6508)

* Start

* Remove debug println

* Add tests
This commit is contained in:
Bastian Köcher
2020-06-30 16:44:52 +02:00
committed by GitHub
parent 4fd770dcf9
commit 53be6ec510
9 changed files with 172 additions and 53 deletions
+2 -2
View File
@@ -1287,7 +1287,7 @@ impl<B: BlockT, H: ExHashT> Protocol<B, H> {
}
let is_best = self.context_data.chain.info().best_hash == hash;
debug!(target: "sync", "Reannouncing block {:?}", hash);
debug!(target: "sync", "Reannouncing block {:?} is_best: {}", hash, is_best);
self.send_announcement(&header, data, is_best, true)
}
@@ -2160,7 +2160,7 @@ mod tests {
reserved_only: false,
priority_groups: Vec::new(),
},
Box::new(DefaultBlockAnnounceValidator::new(client.clone())),
Box::new(DefaultBlockAnnounceValidator),
None,
Default::default(),
None,