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

Function wait_plugin

lightningd/bitcoind.c:59–74  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 1

bitcoind_check_commandsFunction · 0.85

Calls 1

config_pluginFunction · 0.85

Tested by

no test coverage detected