Race conditions dealing with new peers and possibly pubsub {un,}subscriptions
ralexstokes opened this issue · 0 comments
ralexstokes commented
When writing tests to connect two hosts and have them share gossip, I find I have to insert arbitrary trio.sleep(n)
to ensure state inside the libp2p machinery has had time to settle.
Ideally when we call some function async do_a_thing
, await do_a_thing
blocks until the action has completed and all internal state reflects this effect.
Ping me for an example in https://github.com/ethereum/trinity