Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
p2p/discover: use synchronous version of addSeenNode
We get this data race when running TestTable_BucketIPLimit Write at 0x00c00029c000 by goroutine 64: github.com/ethereum/go-ethereum/p2p/discover.(*Table).addSeenNodeSync() /home/runner/work/ronin/ronin/p2p/discover/table.go:570 +0x70a github.com/ethereum/go-ethereum/p2p/discover.(*Table).addSeenNode.func1() /home/runner/work/ronin/ronin/p2p/discover/table.go:527 +0x47 Previous read at 0x00c00029c000 by goroutine 57: github.com/ethereum/go-ethereum/p2p/discover.checkIPLimitInvariant() /home/runner/work/ronin/ronin/p2p/discover/table_test.go:187 +0x105 github.com/ethereum/go-ethereum/p2p/discover.TestTable_BucketIPLimit() /home/runner/work/ronin/ronin/p2p/discover/table_test.go:177 +0x2e4 testing.tRunner() /opt/hostedtoolcache/go/1.20.10/x64/src/testing/testing.go:1576 +0x216 testing.(*T).Run.func1() /opt/hostedtoolcache/go/1.20.10/x64/src/testing/testing.go:1629 +0x47 This commit changes TestTable_BucketIPLimit to use synchronous version of addSeenNode to avoid the data race.
- Loading branch information