go-ethereum
go-ethereum copied to clipboard
Data race in p2p/discover/table_real.go
System information
Geth version: latest
OS & Version: OSX
Steps to reproduce the behaviour
When we run our shisui node with -race flag, we found a data race in table(the method name and the line number in the picture is the same with file in geth).
the nextTime field of revalidationList may be read and write in the same time, beacuse these methods run in different goroutines.
type revalidationList struct {
nodes []*tableNode
nextTime mclock.AbsTime
interval time.Duration
name string
}
I'd like to make a pr to fix this.
related issue