Help with libp2p Gossipsub message publishing

Hey there, I am working on a project based on the provided gossipsub example and I am seeing some behaviour that I don't quite understand. After dialing a specific address I am attempting to publish to a topic but I am told there are insufficient peers, I am still perfectly able to publish to a topic via text from the stdin as per the example however. I thought initially that introducing some time between dialing and publishing would resolve it, but regardless of asking the thread to sleep, it still is unable to publish.

The repo can be found here - there isn't much different from the example and the portion of the code of interest is here; to run it set the env variable ACTOR=Mothership and use cargo run, then in a separate window set the env variable to ACTOR=Minion, and you should see the behaviour I describe.

Any help with understanding what is going on would be greatly appreciated :slight_smile: