mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-03-01 01:32:34 +01:00
Previously, we'd fail on 'all'. `fundchannel_start` needs an amount in order to start a funding transaction. The way that we approach this is to first call `txprepare` with a placeholder address and the 'all' amount; this will return the maximum amount available. We then clamp this to the max_funding (currently hardcoded, in the future we'd want to consult our/the peer's features) and then use the amount on the output in the prepared transaction as the funding amount. We then pass this amount to fundchannel_start, after we've started it successfully we cancel the held placeholder transaction and prepare a second transaction for the exact amount, using the funding address that fundchannel_start passed back. |
||
---|---|---|
.. | ||
.gitignore | ||
autoclean.c | ||
fundchannel.c | ||
libplugin.c | ||
libplugin.h | ||
Makefile | ||
pay.c | ||
README.md |
Plugin Directory
Anything file in this directory which is executable and doesn't start and doesn't contain ASCII symbols other than '.', '-' or '_' will be automatically loaded when lightningd starts (unless suppressed with commandline options).