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

Function main

plugins/bkpr/bookkeeper.c:2090–2114  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2088}
2089
2090int main(int argc, char *argv[])
2091{
2092 struct bkpr *bkpr;
2093 setup_locale();
2094
2095 /* No datadir is default */
2096 bkpr = tal(NULL, struct bkpr);
2097 bkpr->currency = NULL;
2098 bkpr->currency_rates = tal(bkpr, currencymap_t);
2099 bkpr->accounts = NULL;
2100 uintmap_init(bkpr->currency_rates);
2101 memleak_add_helper(bkpr->currency_rates, memleak_scan_currencyrates);
2102 plugin_main(argv, init, take(bkpr), PLUGIN_STATIC, true, NULL,
2103 commands, ARRAY_SIZE(commands),
2104 notifs, ARRAY_SIZE(notifs),
2105 NULL, 0,
2106 NULL, 0,
2107 plugin_option_dynamic("bkpr-currency",
2108 "string",
2109 "Look up and record this currency on each event",
2110 option_currency, currency_jsonfmt, bkpr),
2111 NULL);
2112
2113 return 0;
2114}

Callers

nothing calls this directly

Calls 2

setup_localeFunction · 0.85
plugin_mainFunction · 0.50

Tested by

no test coverage detected