diff --git a/lightningd/connect_control.c b/lightningd/connect_control.c index 144f777100b3..ae73c7a35efb 100644 --- a/lightningd/connect_control.c +++ b/lightningd/connect_control.c @@ -1,4 +1,5 @@ #include "config.h" +#include #include #include #include @@ -140,7 +141,7 @@ static struct command_result *json_connect(struct command *cmd, /* Is there a port? */ if (!port) { port = tal(cmd, u32); - *port = DEFAULT_PORT; + *port = chainparams->ln_port; } addr = tal(cmd, struct wireaddr_internal); if (!parse_wireaddr_internal(name, addr, *port, false, diff --git a/lightningd/lightningd.c b/lightningd/lightningd.c index b8e60b3fff65..08f72a02d8da 100644 --- a/lightningd/lightningd.c +++ b/lightningd/lightningd.c @@ -969,7 +969,7 @@ int main(int argc, char *argv[]) /*~ Set the default portnum according to the used network * similarly to what Bitcoin Core does to ports by default. */ - ld->portnum = DEFAULT_PORT + chainparams->rpc_port - 8332; + ld->portnum = chainparams->ln_port; /*~ Initialize all the plugins we just registered, so they can * do their thing and tell us about themselves (including