mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-13 18:10:25 +02:00
Merge pull request #9033 from ziggie1984/non-anchor-channel-bump
error out when non-anchor channels are tried to bump the force close fee.
This commit is contained in:
@@ -26,6 +26,11 @@
|
|||||||
* [Fix a bug](https://github.com/lightningnetwork/lnd/pull/9134) that would
|
* [Fix a bug](https://github.com/lightningnetwork/lnd/pull/9134) that would
|
||||||
cause a nil pointer dereference during the probing of a payment request that
|
cause a nil pointer dereference during the probing of a payment request that
|
||||||
does not contain a payment address.
|
does not contain a payment address.
|
||||||
|
|
||||||
|
* [Fixed a bug](https://github.com/lightningnetwork/lnd/pull/9033) where we
|
||||||
|
would not signal an error when trying to bump an non-anchor channel but
|
||||||
|
instead report a successful cpfp registration although no fee bumping is
|
||||||
|
possible for non-anchor channels anyways.
|
||||||
|
|
||||||
* [Use the required route blinding
|
* [Use the required route blinding
|
||||||
feature-bit](https://github.com/lightningnetwork/lnd/pull/9143) for invoices
|
feature-bit](https://github.com/lightningnetwork/lnd/pull/9143) for invoices
|
||||||
|
@@ -1179,6 +1179,11 @@ func (w *WalletKit) BumpForceCloseFee(_ context.Context,
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if !channel.ChanType.HasAnchors() {
|
||||||
|
return nil, fmt.Errorf("not able to bump the fee of a " +
|
||||||
|
"non-anchor channel")
|
||||||
|
}
|
||||||
|
|
||||||
// Match pending sweeps with commitments of the channel for which a bump
|
// Match pending sweeps with commitments of the channel for which a bump
|
||||||
// is requested. Depending on the commitment state when force closing
|
// is requested. Depending on the commitment state when force closing
|
||||||
// the channel we might have up to 3 commitments to consider when
|
// the channel we might have up to 3 commitments to consider when
|
||||||
@@ -1237,6 +1242,10 @@ func (w *WalletKit) BumpForceCloseFee(_ context.Context,
|
|||||||
return commitSet.Contains(sweep.OutPoint.Hash)
|
return commitSet.Contains(sweep.OutPoint.Hash)
|
||||||
}, pendingSweeps)
|
}, pendingSweeps)
|
||||||
|
|
||||||
|
if len(anchors) == 0 {
|
||||||
|
return nil, fmt.Errorf("unable to find pending anchor outputs")
|
||||||
|
}
|
||||||
|
|
||||||
// Filter all relevant anchor sweeps and update the sweep request.
|
// Filter all relevant anchor sweeps and update the sweep request.
|
||||||
for _, anchor := range anchors {
|
for _, anchor := range anchors {
|
||||||
// Anchor cpfp bump request are predictable because they are
|
// Anchor cpfp bump request are predictable because they are
|
||||||
|
Reference in New Issue
Block a user