From cefbb77b1e87fd5e50db943a45aaa6a680138c70 Mon Sep 17 00:00:00 2001 From: Alex Akselrod Date: Wed, 21 Feb 2024 15:04:56 -0800 Subject: [PATCH] lnwallet: use `ReleaseOutput` instead of `UnlockOutpoint` --- lnwallet/wallet.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lnwallet/wallet.go b/lnwallet/wallet.go index 99a2f380b..7786791f9 100644 --- a/lnwallet/wallet.go +++ b/lnwallet/wallet.go @@ -588,7 +588,7 @@ func (l *LightningWallet) ResetReservations() { l.reservationIDs = make(map[[32]byte]uint64) for outpoint := range l.lockedOutPoints { - l.UnlockOutpoint(outpoint) + _ = l.ReleaseOutput(chanfunding.LndInternalLockID, outpoint) } l.lockedOutPoints = make(map[wire.OutPoint]struct{}) } @@ -1425,7 +1425,10 @@ func (l *LightningWallet) handleFundingCancelRequest(req *fundingReserveCancelMs // requests. for _, unusedInput := range pendingReservation.ourContribution.Inputs { delete(l.lockedOutPoints, unusedInput.PreviousOutPoint) - l.UnlockOutpoint(unusedInput.PreviousOutPoint) + _ = l.ReleaseOutput( + chanfunding.LndInternalLockID, + unusedInput.PreviousOutPoint, + ) } // TODO(roasbeef): is it even worth it to keep track of unused keys?