Send view to new peers (#2392)

* send our view to new peers immediately

* guide: update

* Fix tests by expecting the view updates

* Add test that we send our view on connection

Co-authored-by: Sergei Shulepov <sergei@parity.io>
This commit is contained in:
Robert Habermeier
2021-02-06 05:26:45 -06:00
committed by GitHub
parent 0ffee4f6ef
commit 31d9396395
2 changed files with 97 additions and 25 deletions
@@ -67,7 +67,7 @@ We update our view's `finalized_number` to the provided one and delay `ProtocolM
### Network Event: Peer Connected
Issue a `NetworkBridgeEvent::PeerConnected` for each [Event Handler](#event-handlers) of the peer-set and negotiated protocol version of the peer.
Issue a `NetworkBridgeEvent::PeerConnected` for each [Event Handler](#event-handlers) of the peer-set and negotiated protocol version of the peer. Also issue a `NetworkBridgeEvent::PeerViewChange` and send the peer our current view.
### Network Event: Peer Disconnected