mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-24 01:24:26 +01:00
mfc: add happy path-way for v2 in multifundchannel
Tested and works with both sides funding! Yay. Doesn't do any amount of reasonable cleanup or handling of errors.
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
#include <plugins/spender/fundchannel.h>
|
||||
#include <plugins/spender/multifundchannel.h>
|
||||
#include <plugins/spender/multiwithdraw.h>
|
||||
#include <plugins/spender/openchannel.h>
|
||||
|
||||
/*~ The spender plugin contains various commands that handle
|
||||
* spending from the onchain wallet. */
|
||||
@@ -10,6 +11,7 @@
|
||||
static
|
||||
void spender_init(struct plugin *p, const char *b, const jsmntok_t *t)
|
||||
{
|
||||
openchannel_init(p, b, t);
|
||||
/* whatever_init(p, b, t); */
|
||||
}
|
||||
|
||||
@@ -17,6 +19,7 @@ int main(int argc, char **argv)
|
||||
{
|
||||
char *owner = tal(NULL, char);
|
||||
struct plugin_command *commands;
|
||||
struct plugin_notification *notifs;
|
||||
|
||||
setup_locale();
|
||||
|
||||
@@ -27,10 +30,13 @@ int main(int argc, char **argv)
|
||||
tal_expand(&commands, multifundchannel_commands, num_multifundchannel_commands);
|
||||
/* tal_expand(&commands, whatever_commands, num_whatever_commands); */
|
||||
|
||||
notifs = tal_arr(owner, struct plugin_notification, 0);
|
||||
tal_expand(¬ifs, openchannel_notifs, num_openchannel_notifs);
|
||||
|
||||
plugin_main(argv, &spender_init, PLUGIN_STATIC, true,
|
||||
NULL,
|
||||
commands, tal_count(commands),
|
||||
NULL, 0,
|
||||
notifs, tal_count(notifs),
|
||||
NULL, 0,
|
||||
NULL);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user