lnd: manually set sig pending bit in commitment state machine
This commit fixes a class of bug which would trigger a never ending loop of “null” commitment updates between two peers.
This commit is contained in:
parent
2926988710
commit
496d1e8edc
4
peer.go
4
peer.go
@ -769,6 +769,7 @@ out:
|
||||
peerLog.Errorf("unable to update "+
|
||||
"commitment: %v", err)
|
||||
}
|
||||
state.sigPending = true
|
||||
}
|
||||
case msg, ok := <-upstreamLink:
|
||||
// If the upstream message link is closed, this signals
|
||||
@ -890,6 +891,7 @@ out:
|
||||
"commitment: %v", err)
|
||||
continue
|
||||
}
|
||||
state.sigPending = true
|
||||
state.htlcsToSettle = nil
|
||||
}
|
||||
case <-p.quit:
|
||||
@ -921,8 +923,6 @@ func (p *peer) updateCommitTx(state *commitmentState) error {
|
||||
}
|
||||
p.queueMsg(commitSig, nil)
|
||||
|
||||
state.sigPending = true
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user