lnwallet: add new method to register our preferred minHTLC value
Before this commit, during a reservation, we wouldn’t ever specify our minHTL value. We don’t yet fully validate all channel constrains, but doing this now serves to ensure that once those features are merged, we’ll actually be setting a valid value for minHTLC.
This commit is contained in:
2 files changed
+14
-4
No files matched your search
+4
-4
@@ -626,23 +626,23 @@ func (l *LightningWallet) handleFundingCancelRequest(req *fundingReserveCancelMs
|
||||
|
||||
pendingReservation, ok := l.fundingLimbo[req.pendingFundingID]
|
||||
if !ok {
|
||||
// TODO(roasbeef): make new error, "unkown funding state" or something
|
||||
// TODO(roasbeef): make new error, "unknown funding state" or something
|
||||
req.err <- fmt.Errorf("attempted to cancel non-existent funding state")
|
||||
return
|
||||
}
|
||||
|
||||
// Grab the mutex on the ChannelReservation to ensure thead-safety
|
||||
// Grab the mutex on the ChannelReservation to ensure thread-safety
|
||||
pendingReservation.Lock()
|
||||
defer pendingReservation.Unlock()
|
||||
|
||||
// Mark all previously locked outpoints as usuable for future funding
|
||||
// Mark all previously locked outpoints as useable for future funding
|
||||
// requests.
|
||||
for _, unusedInput := range pendingReservation.ourContribution.Inputs {
|
||||
delete(l.lockedOutPoints, unusedInput.PreviousOutPoint)
|
||||
l.UnlockOutpoint(unusedInput.PreviousOutPoint)
|
||||
}
|
||||
|
||||
// TODO(roasbeef): is it even worth it to keep track of unsed keys?
|
||||
// TODO(roasbeef): is it even worth it to keep track of unused keys?
|
||||
|
||||
// TODO(roasbeef): Is it possible to mark the unused change also as
|
||||
// available?
|
||||
|
||||
Reference in new issue
Block a user