Skip to content
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

[Feature Request] Add "dryrun" optional parameter for withdraw #7579

Open
Impa10r opened this issue Aug 15, 2024 · 3 comments
Open

[Feature Request] Add "dryrun" optional parameter for withdraw #7579

Impa10r opened this issue Aug 15, 2024 · 3 comments

Comments

@Impa10r
Copy link

Impa10r commented Aug 15, 2024

Issue and Steps to Reproduce

The withdraw endpoint pays incorrect fee rate. Here is an example where I asked it to pay 51 sat/vB (via glightning API, but it paid 54.4). It is even worse for withdrawals with no change.

I'd like to be able to run it without actually posting the transaction, so I can go back and fudge the feerate input or amend the psbt and send it instead. This could be easily achieved by an additional optional parameter dryrun. It should still return tx (hex), txid (txid) and psbt (string), just not broadcast the transaction.

getinfo output

"version": "v24.05",

@rustyrussell
Copy link
Contributor

This kind of makes sense for "check" to do this, and return optional extra data? At the moment check doesn't return anything useful in success, but we could enhance that?

@Impa10r
Copy link
Author

Impa10r commented Sep 4, 2024

This kind of makes sense for "check" to do this, and return optional extra data? At the moment check doesn't return anything useful in success, but we could enhance that?

I don't know how check works. I just want to get rawHex from withdraw endpoint.

@Impa10r Impa10r changed the title [Feature Request] Add "dry run" optional parameter for withdraw [Feature Request] Add "dryrun" optional parameter for withdraw Sep 4, 2024
@Impa10r
Copy link
Author

Impa10r commented Sep 8, 2024

This kind of makes sense for "check" to do this, and return optional extra data? At the moment check doesn't return anything useful in success, but we could enhance that?

There is no "check" in glightning, so it won't help me if you implement this only for lightning-cli. I can't think how you can do "check" API for any possible endpoint in Go, with all their parameters. I think adding one option to withdraw is more feasible.

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

No branches or pull requests

2 participants