peer_control: getinfo show correct port on discovered IPs

Changelog-Fixed: peer_control: getinfo shows the correct port on discovered IPs
This commit is contained in:
Michael Schmoock
2022-09-12 15:47:44 +02:00
committed by Rusty Russell
parent 4ca6b36439
commit c8ab8192ca
5 changed files with 45 additions and 15 deletions

View File

@@ -350,9 +350,6 @@ static void handle_remote_addr(struct daemon *daemon, const u8 *msg)
if (!fromwire_gossipd_remote_addr(msg, &remote_addr))
master_badmsg(WIRE_GOSSIPD_REMOTE_ADDR, msg);
/* Best guess is that we use default port for the selected network */
remote_addr.port = chainparams_get_ln_port(chainparams);
switch (remote_addr.type) {
case ADDR_TYPE_IPV4:
if (daemon->remote_addr_v4 != NULL &&