Skip to content
Unverified Commit 7c9e34b5 authored by Alexandru Vasile's avatar Alexandru Vasile Committed by GitHub
Browse files

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: default avatarAlexandru Vasile <[email protected]>
parent b290f27c
Pipeline #506473 waiting for manual action with stages
in 14 minutes and 43 seconds