| 3705 | }; |
| 3706 | |
| 3707 | int main(int argc, char *argv[]) |
| 3708 | { |
| 3709 | struct xpay *xpay; |
| 3710 | |
| 3711 | setup_locale(); |
| 3712 | xpay = tal(NULL, struct xpay); |
| 3713 | xpay->take_over_pay = true; |
| 3714 | xpay->slow_mode = false; |
| 3715 | xpay->dev_no_age = false; |
| 3716 | xpay->user_layers = tal_arr(xpay, const char *, 0); |
| 3717 | list_head_init(&xpay->payments); |
| 3718 | plugin_main(argv, init, take(xpay), |
| 3719 | PLUGIN_RESTARTABLE, true, NULL, |
| 3720 | commands, ARRAY_SIZE(commands), |
| 3721 | notifications, ARRAY_SIZE(notifications), |
| 3722 | hooks, ARRAY_SIZE(hooks), |
| 3723 | outgoing_notifications, ARRAY_SIZE(outgoing_notifications), |
| 3724 | plugin_option_dynamic("xpay-handle-pay", "bool", |
| 3725 | "Make xpay take over pay commands it can handle.", |
| 3726 | bool_option, bool_jsonfmt, &xpay->take_over_pay), |
| 3727 | plugin_option_dynamic("xpay-slow-mode", "bool", |
| 3728 | "Wait until all parts have completed before returning success or failure", |
| 3729 | bool_option, bool_jsonfmt, &xpay->slow_mode), |
| 3730 | plugin_option_multi("xpay-user-layer", "string", |
| 3731 | "Add a layer that will be used for every payment", |
| 3732 | multi_string_option, string_array_jsonfmt, &xpay->user_layers), |
| 3733 | plugin_option_dev("dev-xpay-no-age", "flag", |
| 3734 | "Don't call askrene-age", |
| 3735 | flag_option, flag_jsonfmt, &xpay->dev_no_age), |
| 3736 | NULL); |
| 3737 | } |
nothing calls this directly
no test coverage detected