bsc/swarm/network/stream
Ferenc Szabo 4f8ec44565 swarm/network: fix data race in stream.(*Peer).handleOfferedHashesMsg() (#18468)
* 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
2019-01-17 14:44:29 +01:00
..
intervals swarm: remove unused/dead code (#18351) 2018-12-23 17:31:32 +01:00
testing all: new p2p node representation (#17643) 2018-09-25 00:59:00 +02:00
common_test.go swarm/network: Revised depth and health for Kademlia (#18354) 2018-12-22 06:53:30 +01:00
delivery_test.go swarm/network: Rename minproxbinsize, add as member of simulation (#18408) 2019-01-10 12:33:51 +01:00
delivery.go swarm/network: remove isproxbin bool from kad.Each* iterfunc (#18239) 2019-01-10 03:36:19 +01:00
intervals_test.go swarm/network: Rename minproxbinsize, add as member of simulation (#18408) 2019-01-10 12:33:51 +01:00
lightnode_test.go swarm: Better syncing and retrieval option definition (#17986) 2018-11-07 00:04:18 +01:00
messages.go swarm/network: remove isproxbin bool from kad.Each* iterfunc (#18239) 2019-01-10 03:36:19 +01:00
peer.go swarm/network/stream: disambiguate chunk delivery messages (retrieval… (#17920) 2018-10-21 09:30:41 +02:00
snapshot_retrieval_test.go swarm/network: Rename minproxbinsize, add as member of simulation (#18408) 2019-01-10 12:33:51 +01:00
snapshot_sync_test.go Stream subscriptions (#18355) 2019-01-11 15:08:09 +01:00
stream.go swarm/network: fix data race in stream.(*Peer).handleOfferedHashesMsg() (#18468) 2019-01-17 14:44:29 +01:00
streamer_test.go Stream subscriptions (#18355) 2019-01-11 15:08:09 +01:00
syncer_test.go swarm/network: Rename minproxbinsize, add as member of simulation (#18408) 2019-01-10 12:33:51 +01:00
syncer.go swarm: remove unused/dead code (#18351) 2018-12-23 17:31:32 +01:00
visualized_snapshot_sync_sim_test.go swarm/network: Rename minproxbinsize, add as member of simulation (#18408) 2019-01-10 12:33:51 +01:00