While trying to sync js repos with go-ipfs 0.5.x i notice pubsub tests were failing for js-ipfs-http-client the specific test works like this:
- peer1 swarm connects to peer2
- peer1 and peer2 subscribe to topicA
- peer2 runs ipfs.pubsub.peers() multiple times until it sees peer1
- peer2 publishes a msg to the topic
- test asserts that both peers receive the msg
So this test started to fail with go-ipfs 0.5 talking to @aschmahmann we discovered that this behaviour is due to 0.5 defaulting to gossipsub because with floodsub the test passes.
To make the test pass with gossipsub i needed to add a ~2s (may work with less just a random number) delay between step 3 and 4.
Can we remove the need for that delay and make gossipsub work like floodsub ?
issue ipfs/js-ipfs#3030
pr ipfs/js-ipfs#3013
While trying to sync js repos with go-ipfs 0.5.x i notice pubsub tests were failing for js-ipfs-http-client the specific test works like this:
So this test started to fail with go-ipfs 0.5 talking to @aschmahmann we discovered that this behaviour is due to 0.5 defaulting to gossipsub because with floodsub the test passes.
To make the test pass with gossipsub i needed to add a ~2s (may work with less just a random number) delay between step 3 and 4.
Can we remove the need for that delay and make gossipsub work like floodsub ?
issue ipfs/js-ipfs#3030
pr ipfs/js-ipfs#3013