• Janoš Guljaš's avatar
    swarm/pss: fix data race on HandshakeController.symKeyIndex (#19162) · 340a53a9
    Janoš Guljaš authored
    * swarm/pss: fix data race on HandshakeController.symKeyIndex
    
    The HandshakeController.symKeyIndex map was accessed concurrently.
    Since insufficient test coverage the race is not detected every time.
    However, running TestClientHandshake a 100 times seems to be enough to
    reproduce the race.
    
    Note: I've chosen HandshakeController.lock to protect
    HandshakeController.symKeyIndex as that was already protected in a few
    functions by that lock.
    
    Additionally:
    - removed unused testStore
    - enabled tests in handshake_test.go as they pass
    - removed code duplication by adding getSymKey()
    
    * swarm/pss: fix a data race on HandshakeController.keyC
    
    * swarm/pss: fix data races with on Pss.symKeyPool
    340a53a9
Name
Last commit
Last update
..
api Loading commit data...
bmt Loading commit data...
chunk Loading commit data...
dev Loading commit data...
docker Loading commit data...
fuse Loading commit data...
log Loading commit data...
metrics Loading commit data...
network Loading commit data...
pot Loading commit data...
pss Loading commit data...
sctx Loading commit data...
services/swap Loading commit data...
shed Loading commit data...
spancontext Loading commit data...
state Loading commit data...
storage Loading commit data...
swap Loading commit data...
testutil Loading commit data...
tracing Loading commit data...
version Loading commit data...
AUTHORS Loading commit data...
OWNERS Loading commit data...
README.md Loading commit data...
network_test.go Loading commit data...
swarm.go Loading commit data...
swarm_test.go Loading commit data...