| 774 | } |
| 775 | |
| 776 | static void dev_register_opts(struct lightningd *ld) |
| 777 | { |
| 778 | /* We might want to debug plugins, which are started before normal |
| 779 | * option parsing */ |
| 780 | clnopt_witharg("--dev-debugger=<subprocess>", OPT_EARLY|OPT_DEV, |
| 781 | opt_set_charp, opt_show_charp, |
| 782 | &ld->dev_debug_subprocess, |
| 783 | "Invoke gdb at start of <subprocess>"); |
| 784 | clnopt_noarg("--dev-no-plugin-checksum", OPT_EARLY|OPT_DEV, |
| 785 | opt_set_bool, |
| 786 | &ld->dev_no_plugin_checksum, |
| 787 | "Don't checksum plugins to detect changes"); |
| 788 | clnopt_noarg("--dev-builtin-plugins-unimportant", OPT_EARLY|OPT_DEV, |
| 789 | opt_set_bool, |
| 790 | &ld->plugins->dev_builtin_plugins_unimportant, |
| 791 | "Make builtin plugins unimportant so you can plugin stop them."); |
| 792 | clnopt_noarg("--dev-no-reconnect", OPT_DEV, |
| 793 | opt_set_invbool, |
| 794 | &ld->reconnect, |
| 795 | "Disable automatic reconnect-attempts by this node, but accept incoming"); |
| 796 | clnopt_noarg("--dev-no-reconnect-private", OPT_DEV, |
| 797 | opt_set_invbool, |
| 798 | &ld->reconnect_private, |
| 799 | "Disable automatic reconnect-attempts to peers with private channel(s) only, but accept incoming"); |
| 800 | clnopt_noarg("--dev-fast-reconnect", OPT_DEV, |
| 801 | opt_set_bool, |
| 802 | &ld->dev_fast_reconnect, |
| 803 | "Make max default reconnect delay 3 (not 300) seconds"); |
| 804 | |
| 805 | clnopt_noarg("--dev-fail-on-subdaemon-fail", OPT_DEV, |
| 806 | opt_set_bool, |
| 807 | &ld->dev_subdaemon_fail, opt_hidden); |
| 808 | clnopt_witharg("--dev-disconnect=<filename>", OPT_DEV, |
| 809 | opt_subd_dev_disconnect, |
| 810 | NULL, ld, "File containing disconnection points"); |
| 811 | clnopt_noarg("--dev-allow-localhost", OPT_DEV, |
| 812 | opt_set_bool, |
| 813 | &ld->dev_allow_localhost, |
| 814 | "Announce and allow announcments for localhost address"); |
| 815 | clnopt_witharg("--dev-bitcoind-poll", OPT_DEV|OPT_SHOWINT, |
| 816 | opt_set_u32, opt_show_u32, |
| 817 | &ld->topology->poll_seconds, |
| 818 | "Time between polling for new transactions"); |
| 819 | clnopt_noarg("--dev-fast-gossip", OPT_DEV, |
| 820 | opt_set_bool, |
| 821 | &ld->dev_fast_gossip, |
| 822 | "Make gossip broadcast 1 second, etc"); |
| 823 | clnopt_noarg("--dev-fast-gossip-prune", OPT_DEV, |
| 824 | opt_set_bool, |
| 825 | &ld->dev_fast_gossip_prune, |
| 826 | "Make gossip pruning 120 seconds"); |
| 827 | clnopt_witharg("--dev-force-privkey", OPT_DEV, |
| 828 | opt_force_privkey, NULL, ld, |
| 829 | "Force HSM to use this as node private key"); |
| 830 | clnopt_witharg("--dev-force-bip32-seed", OPT_DEV, |
| 831 | opt_force_bip32_seed, NULL, ld, |
| 832 | "Force HSM to use this as bip32 seed"); |
| 833 | clnopt_witharg("--dev-force-channel-secrets", OPT_DEV, |