I've been testing some code on the latest master and running into unexpected behaviour from the Swarm.
I've found that Swarm is injecting a ConnectionId to the behaviour via inject_connection_established(). In some less-common circumstances (which I've not isolated) upon disconnection, via inject_connection_closed() the Swarm is inputting a different connection id.
In gossipsub, this causes a panic as we are expecting the swarm to inform the behaviour of the past-injected connection, not a new one.
I've been testing some code on the latest master and running into unexpected behaviour from the Swarm.
I've found that Swarm is injecting a
ConnectionIdto the behaviour viainject_connection_established(). In some less-common circumstances (which I've not isolated) upon disconnection, viainject_connection_closed()the Swarm is inputting a different connection id.In gossipsub, this causes a panic as we are expecting the swarm to inform the behaviour of the past-injected connection, not a new one.