mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-02-23 22:46:40 +01:00
Merge pull request #9079 from ziggie1984/remove-unsupported-nolint-directive
chanfunding: remove unsupported linter directive.
This commit is contained in:
commit
65046561c4
1 changed files with 6 additions and 3 deletions
|
@ -373,7 +373,8 @@ func CoinSelectUpToAmount(feeRate chainfee.SatPerKWeight, minAmount, maxAmount,
|
|||
)
|
||||
|
||||
var errInsufficientFunds *ErrInsufficientFunds
|
||||
if err == nil { //nolint:gocritic,ifElseChain
|
||||
switch {
|
||||
case err == nil:
|
||||
// If the coin selection succeeds we check if our total balance
|
||||
// covers the selected set of coins including fees plus an
|
||||
// optional anchor reserve.
|
||||
|
@ -396,11 +397,13 @@ func CoinSelectUpToAmount(feeRate chainfee.SatPerKWeight, minAmount, maxAmount,
|
|||
// our total balance minus reserve and fees.
|
||||
selectSubtractFee = true
|
||||
}
|
||||
} else if errors.As(err, &errInsufficientFunds) {
|
||||
|
||||
case errors.As(err, &errInsufficientFunds):
|
||||
// If the initial coin selection fails due to insufficient funds
|
||||
// we select our total available balance minus fees.
|
||||
selectSubtractFee = true
|
||||
} else {
|
||||
|
||||
default:
|
||||
return nil, 0, 0, err
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue