diff --git a/bitcoin/chainparams.c b/bitcoin/chainparams.c index d26e77910..572f8b167 100644 --- a/bitcoin/chainparams.c +++ b/bitcoin/chainparams.c @@ -137,6 +137,32 @@ const struct chainparams networks[] = { .bip32_key_version = {.bip32_pubkey_version = BIP32_VER_TEST_PUBLIC, .bip32_privkey_version = BIP32_VER_TEST_PRIVATE}, .is_elements = false}, + {.network_name = "testnet4", + .onchain_hrp = "tb", + .lightning_hrp = "tb", + .bip70_name = "testnet4", + // 00000000da84f2bafbbc53dee25a72ae507ff4914b867c565be350b0da8bf043 + .genesis_blockhash = {{{.u.u8 = {0x43, 0xf0, 0x8b, 0xda, 0xb0, 0x50, 0xe3, + 0x5b, 0x56, 0x7c, 0x86, 0x4b, 0x91, 0xf4, + 0x7f, 0x50, 0xae, 0x72, 0x5a, 0xe2, 0xde, + 0x53, 0xbc, 0xfb, 0xba, 0xf2, 0x84, 0xda, + 0x00, 0x00, 0x00, 0x00}}}}, + .rpc_port = 48332, + .ln_port = 49735, + .cli = "bitcoin-cli", + .cli_args = "-testnet4", + .cli_min_supported_version = 150000, + .dust_limit = { 546 }, + .max_funding = AMOUNT_SAT_INIT((1 << 24) - 1), + .max_payment = AMOUNT_MSAT_INIT(0xFFFFFFFFULL), + .max_supply = AMOUNT_SAT_INIT(2100000000000000), + .p2pkh_version = 111, + .p2sh_version = 196, + .testnet = true, + .fee_asset_tag = NULL, + .bip32_key_version = {.bip32_pubkey_version = BIP32_VER_TEST_PUBLIC, + .bip32_privkey_version = BIP32_VER_TEST_PRIVATE}, + .is_elements = false}, {.network_name = "litecoin", .onchain_hrp = "ltc", .lightning_hrp = "ltc", diff --git a/common/configdir.c b/common/configdir.c index c6ac3fdcf..1873074f6 100644 --- a/common/configdir.c +++ b/common/configdir.c @@ -336,6 +336,9 @@ struct configvar **initial_config_opts(const tal_t *ctx, opt_register_early_noarg("--testnet", opt_set_specific_network, "testnet", "Alias for --network=testnet"); + opt_register_early_noarg("--testnet4", + opt_set_specific_network, "testnet4", + "Alias for --network=testnet4"); opt_register_early_noarg("--signet", opt_set_specific_network, "signet", "Alias for --network=signet"); diff --git a/common/json_param.c b/common/json_param.c index 413814423..b95952dd4 100644 --- a/common/json_param.c +++ b/common/json_param.c @@ -775,11 +775,11 @@ struct command_result *param_secrets_array(struct command *cmd, /** * segwit_addr_net_decode - Try to decode a Bech32(m) address and detect - * testnet/mainnet/regtest/signet + * testnet/mainnet/regtest/signet/testnet4 * * This processes the address and returns a string if it is a Bech32 * address specified by BIP173 or Bech32m as by BIP350. The string is - * set whether it is testnet or signet (both "tb"), mainnet ("bc"), + * set whether it is testnet/testnet4/signet ("tb"), mainnet ("bc"), * regtest ("bcrt"). It does not check witness version and program size * restrictions. *