mirror of
https://github.com/status-im/op-geth.git
synced 2025-01-29 16:05:20 +00:00
4f8ec44565
* swarm/network: fix data race in stream.(*Peer).handleOfferedHashesMsg() handleOfferedHashesMsg() contained a data race: - read => in a goroutine, call to c.batchDone() - write => in the main thread, write to c.sessionAt c.batchDone() contained a call to c.AddInterval(). Client was a value receiver for AddInterval. So on c.AddInterval() call the whole client struct got copied (read) while one of its field was modified in handleOfferedHashesMsg() (write). fixes ethersphere/go-ethereum#1086 * swarm/network: simplify some trivial statements