| 1031 | } |
| 1032 | |
| 1033 | static void register_opts(struct lightningd *ld) |
| 1034 | { |
| 1035 | /* This happens before plugins started */ |
| 1036 | opt_register_early_noarg("--test-daemons-only", |
| 1037 | test_subdaemons_and_exit, |
| 1038 | ld, opt_hidden); |
| 1039 | /* Register plugins as an early args, so we can initialize them and have |
| 1040 | * them register more command line options */ |
| 1041 | opt_register_early_arg("--plugin", opt_add_plugin, NULL, ld, |
| 1042 | "Add a plugin to be run (can be used multiple times)"); |
| 1043 | opt_register_early_arg("--plugin-dir", opt_add_plugin_dir, |
| 1044 | NULL, ld, |
| 1045 | "Add a directory to load plugins from (can be used multiple times)"); |
| 1046 | opt_register_early_noarg("--clear-plugins", opt_clear_plugins, |
| 1047 | ld, |
| 1048 | "Remove all plugins added before this option"); |
| 1049 | opt_register_early_arg("--disable-plugin", opt_disable_plugin, |
| 1050 | NULL, ld, |
| 1051 | "Disable a particular plugin by filename/name"); |
| 1052 | |
| 1053 | opt_register_early_arg("--important-plugin", opt_important_plugin, |
| 1054 | NULL, ld, |
| 1055 | "Add an important plugin to be run (can be used multiple times). Die if the plugin dies."); |
| 1056 | |
| 1057 | /* Early, as it suppresses DNS lookups from cmdline too. */ |
| 1058 | opt_register_early_arg("--always-use-proxy", |
| 1059 | opt_set_bool_arg, opt_show_bool, |
| 1060 | &ld->always_use_proxy, "Use the proxy always"); |
| 1061 | |
| 1062 | /* This immediately makes is a daemon. */ |
| 1063 | opt_register_early_noarg("--daemon", opt_start_daemon, ld, |
| 1064 | "Run in the background, suppress stdout/stderr"); |
| 1065 | opt_register_early_arg("--wallet", opt_set_talstr, NULL, |
| 1066 | &ld->wallet_dsn, |
| 1067 | "Location of the wallet database."); |
| 1068 | |
| 1069 | /* This affects our features, so set early. */ |
| 1070 | opt_register_early_noarg("--large-channels|--wumbo", |
| 1071 | opt_set_wumbo, ld, |
| 1072 | "Allow channels larger than 0.16777215 BTC"); |
| 1073 | |
| 1074 | opt_register_early_noarg("--experimental-dual-fund", |
| 1075 | opt_set_dual_fund, ld, |
| 1076 | "experimental: Advertise dual-funding" |
| 1077 | " and allow peers to establish channels" |
| 1078 | " via v2 channel open protocol."); |
| 1079 | |
| 1080 | /* This affects our features, so set early. */ |
| 1081 | opt_register_early_noarg("--experimental-onion-messages", |
| 1082 | opt_set_onion_messages, ld, |
| 1083 | "EXPERIMENTAL: enable send, receive and relay" |
| 1084 | " of onion messages"); |
| 1085 | opt_register_early_noarg("--experimental-offers", |
| 1086 | opt_set_offers, ld, |
| 1087 | "EXPERIMENTAL: enable send and receive of offers" |
| 1088 | " (also sets experimental-onion-messages)"); |
| 1089 | opt_register_early_noarg("--experimental-shutdown-wrong-funding", |
| 1090 | opt_set_shutdown_wrong_funding, ld, |
no test coverage detected