This repository was archived by the owner on Aug 2, 2021. It is now read-only.
This repository was archived by the owner on Aug 2, 2021. It is now read-only.
p2p/simulations: fix intermittent data races related to Node.Up field #1146
Description
We should introduce finer granularity locking on individual Node
s and introduce getters&setters to mitigate possible data races.
Node.Up
is not properly encapsulated; sometimes it's accessed under the protection of Network.lock
sometimes it's just read (e.g., TestStartStopNode
) directly. => data race