lnwallet: fix logUpdate scope in restorePendingLocalUpdates

This commit is contained in:
eugene 2021-04-21 17:37:21 -04:00
parent 9d0d5bdfaf
commit 97007fc4fa
No known key found for this signature in database
GPG Key ID: 118759E83439A9B1

@ -2120,6 +2120,8 @@ func (lc *LightningChannel) restorePendingLocalUpdates(
// If we did have a dangling commit, then we'll examine which updates // If we did have a dangling commit, then we'll examine which updates
// we included in that state and re-insert them into our update log. // we included in that state and re-insert them into our update log.
for _, logUpdate := range pendingRemoteCommitDiff.LogUpdates { for _, logUpdate := range pendingRemoteCommitDiff.LogUpdates {
logUpdate := logUpdate
payDesc, err := lc.logUpdateToPayDesc( payDesc, err := lc.logUpdateToPayDesc(
&logUpdate, lc.remoteUpdateLog, pendingHeight, &logUpdate, lc.remoteUpdateLog, pendingHeight,
chainfee.SatPerKWeight(pendingCommit.FeePerKw), chainfee.SatPerKWeight(pendingCommit.FeePerKw),