| 1426 | } |
| 1427 | |
| 1428 | static void register_opts(struct lightningd *ld) |
| 1429 | { |
| 1430 | /* This happens before plugins started */ |
| 1431 | clnopt_noarg("--test-daemons-only", OPT_EARLY|OPT_EXITS, |
| 1432 | test_subdaemons_and_exit, |
| 1433 | ld, |
| 1434 | "Test that subdaemons can be run, then exit immediately"); |
| 1435 | /* We need to know this even before we talk to plugins */ |
| 1436 | clnopt_witharg("--allow-deprecated-apis", |
| 1437 | OPT_EARLY|OPT_SHOWBOOL, |
| 1438 | opt_set_bool_arg, opt_show_bool, |
| 1439 | &ld->deprecated_ok, |
| 1440 | "Enable deprecated options, JSONRPC commands, fields, etc."); |
| 1441 | /* Register plugins as an early args, so we can initialize them and have |
| 1442 | * them register more command line options */ |
| 1443 | clnopt_witharg("--plugin", OPT_MULTI|OPT_EARLY, |
| 1444 | opt_add_plugin, NULL, ld, |
| 1445 | "Add a plugin to be run (can be used multiple times)"); |
| 1446 | clnopt_witharg("--plugin-dir", OPT_MULTI|OPT_EARLY, |
| 1447 | opt_add_plugin_dir, |
| 1448 | NULL, ld, |
| 1449 | "Add a directory to load plugins from (can be used multiple times)"); |
| 1450 | opt_register_early_noarg("--clear-plugins", opt_clear_plugins, |
| 1451 | ld, |
| 1452 | "Remove all plugins added before this option"); |
| 1453 | clnopt_witharg("--disable-plugin", OPT_MULTI|OPT_EARLY, |
| 1454 | opt_disable_plugin, |
| 1455 | NULL, ld, |
| 1456 | "Disable a particular plugin by filename/name"); |
| 1457 | |
| 1458 | clnopt_witharg("--important-plugin", OPT_MULTI|OPT_EARLY, |
| 1459 | opt_important_plugin, |
| 1460 | NULL, ld, |
| 1461 | "Add an important plugin to be run (can be used multiple times). Die if the plugin dies."); |
| 1462 | |
| 1463 | /* Early, as it suppresses DNS lookups from cmdline too. */ |
| 1464 | clnopt_witharg("--always-use-proxy", OPT_EARLY|OPT_SHOWBOOL, |
| 1465 | opt_set_bool_arg, opt_show_bool, |
| 1466 | &ld->always_use_proxy, "Use the proxy always"); |
| 1467 | |
| 1468 | /* This immediately makes is a daemon. */ |
| 1469 | opt_register_early_noarg("--daemon", opt_start_daemon, ld, |
| 1470 | "Run in the background, suppress stdout/stderr"); |
| 1471 | opt_register_early_arg("--wallet", opt_set_talstr, NULL, |
| 1472 | &ld->wallet_dsn, |
| 1473 | "Location of the wallet database."); |
| 1474 | |
| 1475 | opt_register_early_arg("--recover", opt_set_hsm_secret, NULL, |
| 1476 | ld, |
| 1477 | "Populate hsm_secret with the given codex32/hex/mnemonic secret" |
| 1478 | " and starts the node in `offline` mode."); |
| 1479 | |
| 1480 | /* This affects our features, so set early. */ |
| 1481 | opt_register_early_noarg("--large-channels|--wumbo", |
| 1482 | opt_set_wumbo, ld, |
| 1483 | opt_hidden); |
| 1484 | |
| 1485 | opt_register_early_noarg("--experimental-dual-fund", |
no test coverage detected