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

Function start_bitcoin_cliv

plugins/bcli.c:329–355  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

327}
328
329static void
330start_bitcoin_cliv(const tal_t *ctx,
331 struct command *cmd,
332 struct command_result *(*process)(struct bitcoin_cli *),
333 bool nonzero_exit_ok,
334 enum bitcoind_prio prio,
335 void *stash,
336 const char *method,
337 va_list ap)
338{
339 struct bitcoin_cli *bcli = tal(bitcoind, struct bitcoin_cli);
340
341 bcli->process = process;
342 bcli->cmd = cmd;
343 bcli->prio = prio;
344
345 if (nonzero_exit_ok)
346 bcli->exitstatus = tal(bcli, int);
347 else
348 bcli->exitstatus = NULL;
349
350 bcli->args = gather_argsv(bcli, method, ap);
351 bcli->stash = stash;
352
353 list_add_tail(&bitcoind->pending[bcli->prio], &bcli->list);
354 next_bcli(bcli->prio);
355}
356
357/* If ctx is non-NULL, and is freed before we return, we don't call process().
358 * process returns false() if it's a spurious error, and we should retry. */

Callers 1

start_bitcoin_cliFunction · 0.85

Calls 2

gather_argsvFunction · 0.85
next_bcliFunction · 0.85

Tested by

no test coverage detected