lnrpc: use amount based default routing fee

This commit is contained in:
Oliver Gugger committed 2022-02-02 14:24:53 +01:00
1 parent bfa1cf17b9
commit d22f543906
4 files changed
+12 -9

No files matched your search

+3 -4
View File
@@ -40,10 +40,9 @@ func CalculateFeeLimit(feeLimit *FeeLimit,
return amount * lnwire.MilliSatoshi(feeLimit.GetPercent()) / 100
default:
// If a fee limit was not specified, we'll use the payment's
// amount as an upper bound in order to avoid payment attempts
// from incurring fees higher than the payment amount itself.
return amount
// Fall back to a sane default value that is based on the amount
// itself.
return lnwallet.DefaultRoutingFeeLimitForAmount(amount)
}
}