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

Function main

plugins/funder.c:1757–1883  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1755}
1756
1757int main(int argc, char **argv)
1758{
1759 setup_locale();
1760
1761 /* Our default funding policy is fixed (0msat) */
1762 current_policy = default_funder_policy(NULL, FIXED, 0);
1763
1764 plugin_main(argv, init, NULL, PLUGIN_RESTARTABLE, true,
1765 NULL,
1766 commands, ARRAY_SIZE(commands),
1767 notifs, ARRAY_SIZE(notifs),
1768 hooks, ARRAY_SIZE(hooks),
1769 NULL, 0,
1770 plugin_option("funder-policy",
1771 "string",
1772 "Policy to use for dual-funding requests."
1773 " [match, available, fixed]",
1774 funding_option,
1775 jsonfmt_funding_option,
1776 &current_policy->opt),
1777 plugin_option("funder-policy-mod",
1778 "string",
1779 "Percent to apply policy at"
1780 " (match/available); or amount to fund"
1781 " (fixed)",
1782 amount_sat_or_u64_option,
1783 jsonfmt_policy_mod,
1784 &current_policy->mod),
1785 plugin_option("funder-min-their-funding",
1786 "string",
1787 "Minimum funding peer must open with"
1788 " to activate our policy",
1789 amount_option,
1790 jsonfmt_amount_sat,
1791 &current_policy->min_their_funding),
1792 plugin_option("funder-max-their-funding",
1793 "string",
1794 "Maximum funding peer may open with"
1795 " to activate our policy",
1796 amount_option,
1797 jsonfmt_amount_sat,
1798 &current_policy->max_their_funding),
1799 plugin_option("funder-per-channel-min",
1800 "string",
1801 "Minimum funding we'll add to a channel."
1802 " If we can't meet this, we don't fund",
1803 amount_option,
1804 jsonfmt_amount_sat,
1805 &current_policy->per_channel_min),
1806 plugin_option("funder-per-channel-max",
1807 "string",
1808 "Maximum funding we'll add to a channel."
1809 " We cap all contributions to this",
1810 amount_option,
1811 jsonfmt_amount_sat,
1812 &current_policy->per_channel_max),
1813 plugin_option("funder-reserve-tank",
1814 "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