mirror of
https://github.com/aljazceru/breez-lnd.git
synced 2025-12-18 22:54:26 +01:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user