Skip to content

Commit

Permalink
chainparams: add ln_port in the configuration
Browse files Browse the repository at this point in the history
Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
  • Loading branch information
vincenzopalazzo committed May 8, 2022
1 parent 80db867 commit c137a7e
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
9 changes: 8 additions & 1 deletion bitcoin/chainparams.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ const struct chainparams networks[] = {
0x5a, 0x08, 0x9c, 0x68, 0xd6, 0x19, 0x00,
0x00, 0x00, 0x00, 0x00}}}},
.rpc_port = 8332,
.ln_port = 9735,
.cli = "bitcoin-cli",
.cli_args = NULL,
.cli_min_supported_version = 150000,
Expand Down Expand Up @@ -67,6 +68,7 @@ const struct chainparams networks[] = {
0x33, 0x2a, 0x1f, 0xc7, 0xb2, 0xb7, 0x3c,
0xf1, 0x88, 0x91, 0x0f}}}},
.rpc_port = 18443,
.ln_port = 9735,
.cli = "bitcoin-cli",
.cli_args = "-regtest",
.cli_min_supported_version = 150000,
Expand All @@ -92,6 +94,7 @@ const struct chainparams networks[] = {
0x2c, 0x42, 0x25, 0xe9, 0x73, 0x98, 0x81,
0x08, 0x00, 0x00, 0x00}}}},
.rpc_port = 38332,
.ln_port = 9735,
.cli = "bitcoin-cli",
.cli_args = "-signet",
.cli_min_supported_version = 150000,
Expand All @@ -115,6 +118,7 @@ const struct chainparams networks[] = {
0xe9, 0x0e, 0xad, 0x01, 0xea, 0x33, 0x09,
0x00, 0x00, 0x00, 0x00}}}},
.rpc_port = 18332,
.rpc_port = 19735,
.cli = "bitcoin-cli",
.cli_args = "-testnet",
.cli_min_supported_version = 150000,
Expand All @@ -138,6 +142,7 @@ const struct chainparams networks[] = {
0x1e, 0xda, 0xba, 0x59, 0x40, 0xfd, 0x1f,
0xe3, 0x65, 0xa7, 0x12}}}},
.rpc_port = 9332,
.ln_port = 9735,
.cli = "litecoin-cli",
.cli_args = NULL,
.cli_min_supported_version = 150000,
Expand All @@ -162,6 +167,7 @@ const struct chainparams networks[] = {
0x13, 0xee, 0xfd, 0xd9, 0x51, 0x28, 0x4b,
0x5a, 0x62, 0x66, 0x49}}}},
.rpc_port = 19332,
.ln_port = 9735,
.cli = "litecoin-cli",
.cli_args = "-testnet",
.cli_min_supported_version = 150000,
Expand All @@ -186,6 +192,7 @@ const struct chainparams networks[] = {
0xfe, 0x14, 0x68, 0x01, 0x16, 0x23, 0x93,
0x36, 0x42, 0x86, 0xc6}}}},
.rpc_port = 19332,
.ln_port = 9735,
.cli = "elements-cli",
.cli_args = "-chain=liquid-regtest",
.dust_limit = {546},
Expand All @@ -209,6 +216,7 @@ const struct chainparams networks[] = {
0x68, 0x8d, 0x2c, 0x37, 0x92, 0x96, 0x88,
0x8a, 0x20, 0x60, 0x03}}}},
.rpc_port = 7041,
.ln_port = 9735,
.cli = "elements-cli",
.cli_args = "-chain=liquidv1",
.dust_limit = {546},
Expand Down Expand Up @@ -261,4 +269,3 @@ const char *chainparams_get_network_names(const tal_t *ctx)
tal_append_fmt(&networks_string, ", %s", networks[i].network_name);
return networks_string;
}

8 changes: 8 additions & 0 deletions bitcoin/chainparams.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,14 @@ struct chainparams {
const char *bip70_name;
const struct bitcoin_blkid genesis_blockhash;
const int rpc_port;
/**
* BOLT 1: The default TCP port depends on the network used. The most common networks are:
*
* - Bitcoin mainet with port number 9735 or the corresponding hexadecimal `0x2607`;
* - Bitcoin testnet with port number 19735 (`0x4D17`);
* - Bitcoin signet with port number 39735 (`0xF87`).
*/
const int ln_port;
const char *cli;
const char *cli_args;
/* The min numeric version of cli supported */
Expand Down

0 comments on commit c137a7e

Please sign in to comment.