@@ -465,15 +465,9 @@ func (h *htlcTimeoutResolver) sweepTimeoutTx() error {
465
465
}
466
466
467
467
// Calculate the budget.
468
- //
469
- // TODO(yy): the budget is twice the output's value, which is needed as
470
- // we don't force sweep the output now. To prevent cascading force
471
- // closes, we use all its output value plus a wallet input as the
472
- // budget. This is a temporary solution until we can optionally cancel
473
- // the incoming HTLC, more details in,
474
- // - https://github.com/lightningnetwork/lnd/issues/7969
475
468
budget := calculateBudget (
476
- btcutil .Amount (inp .SignDesc ().Output .Value ), 2 , 0 ,
469
+ btcutil .Amount (inp .SignDesc ().Output .Value ),
470
+ h .Budget .DeadlineHTLCRatio , h .Budget .DeadlineHTLC ,
477
471
)
478
472
479
473
h .log .Infof ("offering 2nd-level HTLC timeout tx to sweeper " +
@@ -535,15 +529,9 @@ func (h *htlcTimeoutResolver) sweepDirectHtlcOutput() error {
535
529
)
536
530
537
531
// Calculate the budget.
538
- //
539
- // TODO(yy): the budget is twice the output's value, which is needed as
540
- // we don't force sweep the output now. To prevent cascading force
541
- // closes, we use all its output value plus a wallet input as the
542
- // budget. This is a temporary solution until we can optionally cancel
543
- // the incoming HTLC, more details in,
544
- // - https://github.com/lightningnetwork/lnd/issues/7969
545
532
budget := calculateBudget (
546
- btcutil .Amount (sweepInput .SignDesc ().Output .Value ), 2 , 0 ,
533
+ btcutil .Amount (sweepInput .SignDesc ().Output .Value ),
534
+ h .Budget .DeadlineHTLCRatio , h .Budget .DeadlineHTLC ,
547
535
)
548
536
549
537
log .Infof ("%T(%x): offering offered remote timeout HTLC output to " +
0 commit comments