lnwallet: no need to grab mutex in ProcessChanSyncMsg as is init method
In this method we fix an existing deadlock within the unit tests when running with the race condition detector on. We don’t need to grab the mutex within the ProcessChanSyncMsg method as this should be the very first method called when initializing the channel if a channel state sync is needed.
This commit is contained in:
parent
7d10ab3ae8
commit
010815e280
@ -3000,8 +3000,6 @@ func (lc *LightningChannel) SignNextCommitment() (*btcec.Signature, []*btcec.Sig
|
||||
// * RevokeAndAck: if we sent a revocation message that they claim to have
|
||||
// not received
|
||||
func (lc *LightningChannel) ProcessChanSyncMsg(msg *lnwire.ChannelReestablish) ([]lnwire.Message, error) {
|
||||
lc.Lock()
|
||||
defer lc.Unlock()
|
||||
|
||||
// We owe them a commitment if they have an un-acked commitment and the
|
||||
// tip of their chain (from our Pov) is equal to what they think their
|
||||
|
Loading…
Reference in New Issue
Block a user