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

Function main

plugins/funder.c:1716–1842  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1714}
1715
1716int main(int argc, char **argv)
1717{
1718 setup_locale();
1719
1720 /* Our default funding policy is fixed (0msat) */
1721 current_policy = default_funder_policy(NULL, FIXED, 0);
1722
1723 plugin_main(argv, init, NULL, PLUGIN_RESTARTABLE, true,
1724 NULL,
1725 commands, ARRAY_SIZE(commands),
1726 notifs, ARRAY_SIZE(notifs),
1727 hooks, ARRAY_SIZE(hooks),
1728 NULL, 0,
1729 plugin_option("funder-policy",
1730 "string",
1731 "Policy to use for dual-funding requests."
1732 " [match, available, fixed]",
1733 funding_option,
1734 jsonfmt_funding_option,
1735 &current_policy->opt),
1736 plugin_option("funder-policy-mod",
1737 "string",
1738 "Percent to apply policy at"
1739 " (match/available); or amount to fund"
1740 " (fixed)",
1741 amount_sat_or_u64_option,
1742 jsonfmt_policy_mod,
1743 &current_policy->mod),
1744 plugin_option("funder-min-their-funding",
1745 "string",
1746 "Minimum funding peer must open with"
1747 " to activate our policy",
1748 amount_option,
1749 jsonfmt_amount_sat,
1750 &current_policy->min_their_funding),
1751 plugin_option("funder-max-their-funding",
1752 "string",
1753 "Maximum funding peer may open with"
1754 " to activate our policy",
1755 amount_option,
1756 jsonfmt_amount_sat,
1757 &current_policy->max_their_funding),
1758 plugin_option("funder-per-channel-min",
1759 "string",
1760 "Minimum funding we'll add to a channel."
1761 " If we can't meet this, we don't fund",
1762 amount_option,
1763 jsonfmt_amount_sat,
1764 &current_policy->per_channel_min),
1765 plugin_option("funder-per-channel-max",
1766 "string",
1767 "Maximum funding we'll add to a channel."
1768 " We cap all contributions to this",
1769 amount_option,
1770 jsonfmt_amount_sat,
1771 &current_policy->per_channel_max),
1772 plugin_option("funder-reserve-tank",
1773 "string",

Callers

nothing calls this directly

Calls 5

setup_localeFunction · 0.85
default_funder_policyFunction · 0.85
tal_freeFunction · 0.85
plugin_mainFunction · 0.70
plugin_optionClass · 0.70

Tested by

no test coverage detected