Send block status with announcement (#3607)

* Send block status with announcement

* Fixed tests

* Whitespace

Co-Authored-By: Gavin Wood <gavin@parity.io>

* Additional comment

* Update comment

Co-Authored-By: André Silva <andre.beat@gmail.com>
This commit is contained in:
Arkadiy Paronyan
2019-09-17 11:19:46 +02:00
committed by Bastian Köcher
parent 6679c8b051
commit 84d0c790f3
6 changed files with 85 additions and 30 deletions
+2 -2
View File
@@ -297,8 +297,8 @@ impl<B: BlockT + 'static, S: NetworkSpecialization<B>, H: ExHashT> NetworkWorker
}
/// You must call this when a new block is imported by the client.
pub fn on_block_imported(&mut self, hash: B::Hash, header: B::Header) {
self.network_service.user_protocol_mut().on_block_imported(hash, &header);
pub fn on_block_imported(&mut self, hash: B::Hash, header: B::Header, is_best: bool) {
self.network_service.user_protocol_mut().on_block_imported(hash, &header, is_best);
}
/// You must call this when a new block is finalized by the client.