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

Function main

plugins/askrene/askrene.c:1612–1635  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1610}
1611
1612int main(int argc, char *argv[])
1613{
1614 struct askrene *askrene;
1615 setup_locale();
1616
1617 askrene = tal(NULL, struct askrene);
1618 askrene->route_seconds = 10;
1619 askrene->max_children = 4;
1620 plugin_main(argv, init, take(askrene), PLUGIN_RESTARTABLE, true, NULL, commands, ARRAY_SIZE(commands),
1621 NULL, 0, NULL, 0, NULL, 0,
1622 plugin_option_dynamic("askrene-timeout",
1623 "int",
1624 "How many seconds to try before giving up on calculating a route."
1625 " Defaults to 10 seconds",
1626 u32_option, u32_jsonfmt,
1627 &askrene->route_seconds),
1628 plugin_option_dynamic("askrene-max-threads",
1629 "int",
1630 "How many routes to calculate at once."
1631 " Defaults to 4",
1632 u32_option, u32_jsonfmt,
1633 &askrene->max_children),
1634 NULL);
1635}

Callers

nothing calls this directly

Calls 2

setup_localeFunction · 0.85
plugin_mainFunction · 0.50

Tested by

no test coverage detected