Skip to content

Commit c137a7e

Browse files
chainparams: add ln_port in the configuration
Signed-off-by: Vincenzo Palazzo <[email protected]>
1 parent 80db867 commit c137a7e

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

bitcoin/chainparams.c

+8-1
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ const struct chainparams networks[] = {
3636
0x5a, 0x08, 0x9c, 0x68, 0xd6, 0x19, 0x00,
3737
0x00, 0x00, 0x00, 0x00}}}},
3838
.rpc_port = 8332,
39+
.ln_port = 9735,
3940
.cli = "bitcoin-cli",
4041
.cli_args = NULL,
4142
.cli_min_supported_version = 150000,
@@ -67,6 +68,7 @@ const struct chainparams networks[] = {
6768
0x33, 0x2a, 0x1f, 0xc7, 0xb2, 0xb7, 0x3c,
6869
0xf1, 0x88, 0x91, 0x0f}}}},
6970
.rpc_port = 18443,
71+
.ln_port = 9735,
7072
.cli = "bitcoin-cli",
7173
.cli_args = "-regtest",
7274
.cli_min_supported_version = 150000,
@@ -92,6 +94,7 @@ const struct chainparams networks[] = {
9294
0x2c, 0x42, 0x25, 0xe9, 0x73, 0x98, 0x81,
9395
0x08, 0x00, 0x00, 0x00}}}},
9496
.rpc_port = 38332,
97+
.ln_port = 9735,
9598
.cli = "bitcoin-cli",
9699
.cli_args = "-signet",
97100
.cli_min_supported_version = 150000,
@@ -115,6 +118,7 @@ const struct chainparams networks[] = {
115118
0xe9, 0x0e, 0xad, 0x01, 0xea, 0x33, 0x09,
116119
0x00, 0x00, 0x00, 0x00}}}},
117120
.rpc_port = 18332,
121+
.rpc_port = 19735,
118122
.cli = "bitcoin-cli",
119123
.cli_args = "-testnet",
120124
.cli_min_supported_version = 150000,
@@ -138,6 +142,7 @@ const struct chainparams networks[] = {
138142
0x1e, 0xda, 0xba, 0x59, 0x40, 0xfd, 0x1f,
139143
0xe3, 0x65, 0xa7, 0x12}}}},
140144
.rpc_port = 9332,
145+
.ln_port = 9735,
141146
.cli = "litecoin-cli",
142147
.cli_args = NULL,
143148
.cli_min_supported_version = 150000,
@@ -162,6 +167,7 @@ const struct chainparams networks[] = {
162167
0x13, 0xee, 0xfd, 0xd9, 0x51, 0x28, 0x4b,
163168
0x5a, 0x62, 0x66, 0x49}}}},
164169
.rpc_port = 19332,
170+
.ln_port = 9735,
165171
.cli = "litecoin-cli",
166172
.cli_args = "-testnet",
167173
.cli_min_supported_version = 150000,
@@ -186,6 +192,7 @@ const struct chainparams networks[] = {
186192
0xfe, 0x14, 0x68, 0x01, 0x16, 0x23, 0x93,
187193
0x36, 0x42, 0x86, 0xc6}}}},
188194
.rpc_port = 19332,
195+
.ln_port = 9735,
189196
.cli = "elements-cli",
190197
.cli_args = "-chain=liquid-regtest",
191198
.dust_limit = {546},
@@ -209,6 +216,7 @@ const struct chainparams networks[] = {
209216
0x68, 0x8d, 0x2c, 0x37, 0x92, 0x96, 0x88,
210217
0x8a, 0x20, 0x60, 0x03}}}},
211218
.rpc_port = 7041,
219+
.ln_port = 9735,
212220
.cli = "elements-cli",
213221
.cli_args = "-chain=liquidv1",
214222
.dust_limit = {546},
@@ -261,4 +269,3 @@ const char *chainparams_get_network_names(const tal_t *ctx)
261269
tal_append_fmt(&networks_string, ", %s", networks[i].network_name);
262270
return networks_string;
263271
}
264-

bitcoin/chainparams.h

+8
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,14 @@ struct chainparams {
2222
const char *bip70_name;
2323
const struct bitcoin_blkid genesis_blockhash;
2424
const int rpc_port;
25+
/**
26+
* BOLT 1: The default TCP port depends on the network used. The most common networks are:
27+
*
28+
* - Bitcoin mainet with port number 9735 or the corresponding hexadecimal `0x2607`;
29+
* - Bitcoin testnet with port number 19735 (`0x4D17`);
30+
* - Bitcoin signet with port number 39735 (`0xF87`).
31+
*/
32+
const int ln_port;
2533
const char *cli;
2634
const char *cli_args;
2735
/* The min numeric version of cli supported */

0 commit comments

Comments
 (0)