mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-01-19 05:45:21 +01:00
funding: fix potential data race
localDiscoverySignals needs to be guarded by its mutex. I was unable to write a test case that would trigger a race under the race detector, but better safe than sorry.
This commit is contained in:
parent
202fcd6672
commit
54474d5cd7
@ -634,7 +634,9 @@ func (f *Manager) start() error {
|
||||
f.newChanBarriers[chanID] = make(chan struct{})
|
||||
f.barrierMtx.Unlock()
|
||||
|
||||
f.localDiscoveryMtx.Lock()
|
||||
f.localDiscoverySignals[chanID] = make(chan struct{})
|
||||
f.localDiscoveryMtx.Unlock()
|
||||
|
||||
// Rebroadcast the funding transaction for any pending
|
||||
// channel that we initiated. No error will be returned
|
||||
|
Loading…
Reference in New Issue
Block a user