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:
Olaoluwa Osuntokun 2017-11-11 15:50:24 -08:00
parent 7d10ab3ae8
commit 010815e280
No known key found for this signature in database
GPG Key ID: 964EA263DD637C21
1 changed files with 0 additions and 2 deletions

View File

@ -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