network-gossip: Ensure sync event is processed on unknown peer roles (#6553)
The `GossipEngine::poll_next` implementation polls both the
`notification_service` and the `sync_event_stream`.
If both polls produce valid data to be processed
(`Poll::Ready(Some(..))`), then the sync event is ignored when we
receive `NotificationEvent::NotificationStreamOpened` and the role
cannot be deduced.
This PR ensures both events are processed gracefully. While at it, I
have added a warning to the sync engine related to
`notification_service` producing `Poll::Ready(None)`.
This effectively ensures that `SyncEvents` propagate to the network
potentially fixing any state mismatch.
For more context: https://github.com/paritytech/polkadot-sdk/issues/6507
cc @paritytech/sdk-node
---------
Signed-off-by: Alexandru Vasile <[email protected]>
Please register or sign in to comment