mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-11-20 02:27:51 +01:00
4ffda340d3
And turn "" includes into full-path (which makes it easier to put config.h first, and finds some cases check-includes.sh missed previously). config.h sets _GNU_SOURCE which really needs to be done before any '#includes': we mainly got away with it with glibc, but other platforms like Alpine may have stricter requirements. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
45 lines
1.3 KiB
C
45 lines
1.3 KiB
C
#include "config.h"
|
|
#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. */
|
|
|
|
static
|
|
const char *spender_init(struct plugin *p, const char *b, const jsmntok_t *t)
|
|
{
|
|
openchannel_init(p, b, t);
|
|
/* whatever_init(p, b, t); */
|
|
return NULL;
|
|
}
|
|
|
|
int main(int argc, char **argv)
|
|
{
|
|
struct plugin_command *commands;
|
|
struct plugin_notification *notifs;
|
|
|
|
setup_locale();
|
|
|
|
commands = tal_arr(NULL, struct plugin_command, 0);
|
|
|
|
tal_expand(&commands, multiwithdraw_commands, num_multiwithdraw_commands);
|
|
tal_expand(&commands, fundchannel_commands, num_fundchannel_commands);
|
|
tal_expand(&commands, multifundchannel_commands, num_multifundchannel_commands);
|
|
/* tal_expand(&commands, whatever_commands, num_whatever_commands); */
|
|
|
|
notifs = tal_arr(NULL, struct plugin_notification, 0);
|
|
tal_expand(¬ifs, openchannel_notifs, num_openchannel_notifs);
|
|
|
|
plugin_main(argv, &spender_init, PLUGIN_STATIC, true,
|
|
NULL,
|
|
take(commands), tal_count(commands),
|
|
take(notifs), tal_count(notifs),
|
|
NULL, 0,
|
|
NULL, 0, /* Notification topics */
|
|
NULL);
|
|
|
|
return 0;
|
|
}
|