Skip to content

Commit

Permalink
lnwallet: no need to grab mutex in ProcessChanSyncMsg as is init method
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Roasbeef committed Nov 11, 2017
1 parent 7d10ab3 commit 010815e
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions lnwallet/channel.go
Expand Up @@ -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
Expand Down

0 comments on commit 010815e

Please sign in to comment.