MCPcopy Create free account
hub / github.com/ElementsProject/lightning / wait_plugin

Function wait_plugin

lightningd/bitcoind.c:65–80  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

63}
64
65static void wait_plugin(struct bitcoind *bitcoind, const char *method,
66 struct plugin *p)
67{
68 /* We need our Bitcoin backend to be initialized, but the plugins have
69 * not yet been started at this point.
70 * So send `init` to each plugin which registered for a Bitcoin method
71 * and wait for its response, which we take as an ACK that it is
72 * operational (i.e. bcli will wait for `bitcoind` to be warmed up
73 * before responding to `init`).
74 * Note that lightningd/plugin will not send `init` to an already
75 * configured plugin. */
76 if (p->plugin_state == NEEDS_INIT)
77 config_plugin(p);
78
79 strmap_add(&bitcoind->pluginsmap, method, p);
80}
81
82void bitcoind_check_commands(struct bitcoind *bitcoind)
83{

Callers 1

bitcoind_check_commandsFunction · 0.85

Calls 1

config_pluginFunction · 0.85

Tested by

no test coverage detected