| 1755 | } |
| 1756 | |
| 1757 | int 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 | ¤t_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 | ¤t_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 | ¤t_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 | ¤t_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 | ¤t_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 | ¤t_policy->per_channel_max), |
| 1813 | plugin_option("funder-reserve-tank", |
| 1814 | "string", |
nothing calls this directly
no test coverage detected