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

Function init

plugins/funder.c:1505–1529  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1503}
1504
1505static const char *init(struct command *init_cmd, const char *b, const jsmntok_t *t)
1506{
1507 const char *err;
1508 struct amount_msat msat;
1509
1510 list_head_init(&pending_opens);
1511
1512 err = funder_check_policy(current_policy);
1513 if (err)
1514 plugin_err(init_cmd->plugin, "Invalid parameter combination: %s", err);
1515
1516 if (current_policy->rates)
1517 tell_lightningd_lease_rates(init_cmd, current_policy->rates);
1518
1519 rpc_scan(init_cmd, "listconfigs",
1520 take(json_out_obj(NULL, NULL, NULL)),
1521 "{configs:"
1522 "{min-emergency-msat:{value_msat:%}}}",
1523 JSON_SCAN(json_to_msat, &msat));
1524
1525 emergency_reserve = amount_msat_to_sat_round_down(msat);
1526 plugin_set_memleak_handler(init_cmd->plugin, memleak_mark);
1527
1528 return NULL;
1529}
1530
1531const struct plugin_hook hooks[] = {
1532 {

Callers

nothing calls this directly

Calls 8

list_head_initFunction · 0.85
funder_check_policyFunction · 0.85
plugin_errFunction · 0.70
rpc_scanFunction · 0.70
json_out_objFunction · 0.70

Tested by

no test coverage detected