From c07d44b4d4acddecf232d859b7b424c086d06706 Mon Sep 17 00:00:00 2001 From: Vincenzo Palazzo Date: Sat, 18 Jun 2022 14:18:38 +0100 Subject: [PATCH] docs: update the docs in according with the new code Suggested-by: @rustyrussell Signed-off-by: Vincenzo Palazzo # Title: Signed-off-by: Vincenzo Palazzo --- bitcoin/chainparams.h | 4 +++- doc/lightning-connect.7.md | 6 +++++- doc/lightningd-config.5.md | 3 ++- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/bitcoin/chainparams.h b/bitcoin/chainparams.h index f5c71509d..8bf4ee29c 100644 --- a/bitcoin/chainparams.h +++ b/bitcoin/chainparams.h @@ -23,7 +23,9 @@ struct chainparams { 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: + * 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`); diff --git a/doc/lightning-connect.7.md b/doc/lightning-connect.7.md index c2e9851f7..ff4cfcb73 100644 --- a/doc/lightning-connect.7.md +++ b/doc/lightning-connect.7.md @@ -18,7 +18,11 @@ be of the form *id@host* or *id@host:port*. In this case, the *host* and *host* is the peer's hostname or IP address. -If not specified, the *port* defaults to 9735. +If not specified, the *port* depends on the current network: +- bitcoin **mainnet**: 9735. +- bitcoin **testnet**: 19735. +- bitcoin **signet**: 39735. +- bitcoin **regtest**: 19846. If *host* is not specified (or doesn't work), the connection will be attempted to an IP belonging to *id* obtained through gossip with other already connected diff --git a/doc/lightningd-config.5.md b/doc/lightningd-config.5.md index 31832958b..92fc7e63f 100644 --- a/doc/lightningd-config.5.md +++ b/doc/lightningd-config.5.md @@ -372,7 +372,8 @@ network. Note that for simple setups, the implicit *autolisten* option does the right thing: for the mainnet (bitcoin) network it will try to bind to port 9735 on IPv4 and IPv6, and will announce it to peers if it seems -like a public address. +like a public address (and other default ports for other networks, +as described below). Core Lightning also support IPv4/6 address discovery behind NAT routers. If your node detects an new public address, it will update its announcement.