lightningd: allow --regtest.

Developers, rejoice (we already have --testnet, --signet and --mainnet!).

Changelog-Added: Config: `--regtest` option as alias for `--network=regtest`
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell 2023-06-02 12:06:03 +09:30
parent edbaa944da
commit 5a0994c2d0
2 changed files with 7 additions and 0 deletions

View file

@ -340,6 +340,9 @@ struct configvar **initial_config_opts(const tal_t *ctx,
opt_register_early_noarg("--mainnet",
opt_set_specific_network, "bitcoin",
"Alias for --network=bitcoin");
opt_register_early_noarg("--regtest",
opt_set_specific_network, "regtest",
"Alias for --network=regtest");
/* Handle --version (and exit) here too */
opt_register_version();

View file

@ -81,6 +81,10 @@ This is not valid within the per-network configuration file.
Alias for *network=bitcoin*.
* **regtest**
Alias for *network=regtest* (added in v23.08)
* **testnet**
Alias for *network=testnet*.