lnwallet: add assertion in createCommitmentTx to detect overdraw attempts
In this commit, we add a precautionary assertion at the end of createCommitmentTx. This assertion is meant to ensure that we don't accept or propose a commitment transaction that attempts to send out more than it was funded with.
This commit is contained in:
2 files changed
+15
-1
No files matched your search
+1
-1
@@ -685,7 +685,7 @@ func (l *LightningWallet) handleContributionMsg(req *addContributionMsg) {
|
||||
return
|
||||
}
|
||||
|
||||
// Grab the mutex on the ChannelReservation to ensure thead-safety
|
||||
// Grab the mutex on the ChannelReservation to ensure thread-safety
|
||||
pendingReservation.Lock()
|
||||
defer pendingReservation.Unlock()
|
||||
|
||||
|
||||
Reference in new issue
Block a user