mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-10-11 07:53:00 +02:00
lnwallet: use ReleaseOutput
instead of UnlockOutpoint
This commit is contained in:
@@ -588,7 +588,7 @@ func (l *LightningWallet) ResetReservations() {
|
|||||||
l.reservationIDs = make(map[[32]byte]uint64)
|
l.reservationIDs = make(map[[32]byte]uint64)
|
||||||
|
|
||||||
for outpoint := range l.lockedOutPoints {
|
for outpoint := range l.lockedOutPoints {
|
||||||
l.UnlockOutpoint(outpoint)
|
_ = l.ReleaseOutput(chanfunding.LndInternalLockID, outpoint)
|
||||||
}
|
}
|
||||||
l.lockedOutPoints = make(map[wire.OutPoint]struct{})
|
l.lockedOutPoints = make(map[wire.OutPoint]struct{})
|
||||||
}
|
}
|
||||||
@@ -1425,7 +1425,10 @@ func (l *LightningWallet) handleFundingCancelRequest(req *fundingReserveCancelMs
|
|||||||
// requests.
|
// requests.
|
||||||
for _, unusedInput := range pendingReservation.ourContribution.Inputs {
|
for _, unusedInput := range pendingReservation.ourContribution.Inputs {
|
||||||
delete(l.lockedOutPoints, unusedInput.PreviousOutPoint)
|
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?
|
// TODO(roasbeef): is it even worth it to keep track of unused keys?
|
||||||
|
Reference in New Issue
Block a user