lnwallet: use new maxFeeRatio for sanityCheckFee func

This commit is contained in:
George Tsagkarelis
2024-09-19 16:20:48 +02:00
parent 85175814a4
commit a72dae314c
4 changed files with 47 additions and 27 deletions

View File

@@ -1921,7 +1921,7 @@ func (w *WalletKit) fundPsbtCoinSelect(account string, changeIndex int32,
changeAmt, needMore, err := chanfunding.CalculateChangeAmount(
inputSum, outputSum, packetFeeNoChange,
packetFeeWithChange, changeDustLimit, changeType,
packetFeeWithChange, changeDustLimit, changeType, 0,
)
if err != nil {
return nil, fmt.Errorf("error calculating change "+
@@ -1978,7 +1978,7 @@ func (w *WalletKit) fundPsbtCoinSelect(account string, changeIndex int32,
selectedCoins, changeAmount, err := chanfunding.CoinSelect(
feeRate, fundingAmount, changeDustLimit, coins,
strategy, estimator, changeType,
strategy, estimator, changeType, 0,
)
if err != nil {
return fmt.Errorf("error selecting coins: %w", err)