| 1228 | } |
| 1229 | |
| 1230 | int main(int argc, char **argv) |
| 1231 | { |
| 1232 | setup_locale(); |
| 1233 | |
| 1234 | /* Our default funding policy is fixed (0msat) */ |
| 1235 | current_policy = default_funder_policy(NULL, FIXED, 0); |
| 1236 | |
| 1237 | plugin_main(argv, init, PLUGIN_RESTARTABLE, true, |
| 1238 | NULL, |
| 1239 | commands, ARRAY_SIZE(commands), |
| 1240 | notifs, ARRAY_SIZE(notifs), |
| 1241 | hooks, ARRAY_SIZE(hooks), |
| 1242 | NULL, 0, |
| 1243 | plugin_option("funder-policy", |
| 1244 | "string", |
| 1245 | "Policy to use for dual-funding requests." |
| 1246 | " [match, available, fixed]", |
| 1247 | funding_option, ¤t_policy->opt), |
| 1248 | plugin_option("funder-policy-mod", |
| 1249 | "string", |
| 1250 | "Percent to apply policy at" |
| 1251 | " (match/available); or amount to fund" |
| 1252 | " (fixed)", |
| 1253 | amount_sat_or_u64_option, |
| 1254 | ¤t_policy->mod), |
| 1255 | plugin_option("funder-min-their-funding", |
| 1256 | "string", |
| 1257 | "Minimum funding peer must open with" |
| 1258 | " to activate our policy", |
| 1259 | amount_option, |
| 1260 | ¤t_policy->min_their_funding), |
| 1261 | plugin_option("funder-max-their-funding", |
| 1262 | "string", |
| 1263 | "Maximum funding peer may open with" |
| 1264 | " to activate our policy", |
| 1265 | amount_option, |
| 1266 | ¤t_policy->max_their_funding), |
| 1267 | plugin_option("funder-per-channel-min", |
| 1268 | "string", |
| 1269 | "Minimum funding we'll add to a channel." |
| 1270 | " If we can't meet this, we don't fund", |
| 1271 | amount_option, |
| 1272 | ¤t_policy->per_channel_min), |
| 1273 | plugin_option("funder-per-channel-max", |
| 1274 | "string", |
| 1275 | "Maximum funding we'll add to a channel." |
| 1276 | " We cap all contributions to this", |
| 1277 | amount_option, |
| 1278 | ¤t_policy->per_channel_max), |
| 1279 | plugin_option("funder-reserve-tank", |
| 1280 | "string", |
| 1281 | "Amount of funds we'll always leave" |
| 1282 | " available.", |
| 1283 | amount_option, |
| 1284 | ¤t_policy->reserve_tank), |
| 1285 | plugin_option("funder-fuzz-percent", |
| 1286 | "int", |
| 1287 | "Percent to fuzz the policy contribution by." |
nothing calls this directly
no test coverage detected