Skip to content

cli: add max_cltv, max_fee_millionths, fee_cutoff_msat parameters to lnpay #10067

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

f321x
Copy link
Member

@f321x f321x commented Jul 21, 2025

Adds max_cltv, max_fee_millionths and fee_cutoff_msat parameters to the lnpay cli command which allow to specify a custom PaymentFeeBudget for the lnpay payment. Allowing to specify a these parameters can be useful for usecases like #10056.

Closes #10056

@supertestnet
Copy link

I added a comment to the referenced issue here and I hereby copy my comment:

I noticed in your PR that you add some code concerning how the max fee is calculated; it may be useful to let the user override that via an argument in lnpay. For example, if I make a proxy service, perhaps I will charge a flat fee of 50 sats to users; I would like to pass an argument to lnpay with something like max_fee = 49, that way it won't pay more than 49 sats to route the payment, even if my electrum settings would otherwise allow it. That way, my proxy server profits from every outgoing payment.

Adds a `max_cltv` parameter to the `lnpay` cli command which allows to
specify the maximum total locktime of the payment. This is enabled by
constructing a custom `PaymentFeeBudget` object in the lnpay command and
passing it as argument to `LNWallet.pay_invoice()`.
Allowing to specify a `max_cltv` value can be useful for certain
usecases, e.g. see spesmilo#10056.

Closes spesmilo#10056
@f321x f321x changed the title cli: add max_cltv parameter to lnpay cli: add max_cltv, max_fee_millionths, fee_cutoff_msat parameters to lnpay Jul 22, 2025
@f321x
Copy link
Member Author

f321x commented Jul 22, 2025

I have added max_fee_millionths and fee_cutoff_msat parameters to lnpay in 2241015. Now it is possible to fully specify the PaymentFeeBudget with arguments to lnpay.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for setting max_cltv when using the lnpay command
2 participants