lnwallet: use tail() instead of tip() in getUnsignedAckedUpdates
The previous behavior would allow updates to be overwritten in some scenarios. Upon restart, this would lead to a missing settle/fail in the update logs.
This commit is contained in:
parent
97007fc4fa
commit
7da2080a3d
@ -3260,7 +3260,7 @@ func (lc *LightningChannel) getUnsignedAckedUpdates() []channeldb.LogUpdate {
|
||||
chanID := lnwire.NewChanIDFromOutPoint(&lc.channelState.FundingOutpoint)
|
||||
|
||||
// Fetch the last remote update that we have signed for.
|
||||
lastRemoteCommitted := lc.remoteCommitChain.tip().theirMessageIndex
|
||||
lastRemoteCommitted := lc.remoteCommitChain.tail().theirMessageIndex
|
||||
|
||||
// Fetch the last remote update that we have acked.
|
||||
lastLocalCommitted := lc.localCommitChain.tail().theirMessageIndex
|
||||
|
Loading…
Reference in New Issue
Block a user