diff --git a/plugins/recover.c b/plugins/recover.c index 850f85d4531b..580b76f334d7 100644 --- a/plugins/recover.c +++ b/plugins/recover.c @@ -37,7 +37,7 @@ static const char *nodes_for_gossip[] = { "0242a4ae0c5bef18048fbecf995094b74bfb0f7391418d71ed394784373f41e4f3@3.124.63.44", //CoinGate "0364913d18a19c671bb36dd04d6ad5be0fe8f2894314c36a9db3f03c2d414907e1@192.243.215.102", //LQwD-Canada "02f1a8c87607f415c8f22c00593002775941dea48869ce23096af27b0cfdcc0b69@52.13.118.208", //Kraken 🐙⚡ - "037659a0ac8eb3b8d0a720114efc861d3a940382dcfa1403746b4f8f6b2e8810ba@34.78.139.195" //nicehash-ln1 + "037659a0ac8eb3b8d0a720114efc861d3a940382dcfa1403746b4f8f6b2e8810ba@34.78.139.195", //nicehash-ln1 "024b9a1fa8e006f1e3937f65f66c408e6da8e1ca728ea43222a7381df1cc449605@165.232.168.69", //BLUEIRON-v23.08.1 "034ea80f8b148c750463546bd999bf7321a0e6dfc60aaf84bd0400a2e8d376c0d5@213.174.156.66", //LNBiG Hub-1 "026165850492521f4ac8abd9bd8088123446d126f648ca35e60f88177dc149ceb2@45.86.229.190", //Boltz diff --git a/tests/test_misc.py b/tests/test_misc.py index 240683b00f4a..79bba3237b14 100644 --- a/tests/test_misc.py +++ b/tests/test_misc.py @@ -3432,6 +3432,32 @@ def test_restorefrompeer(node_factory, bitcoind): wait_for(lambda: l2.rpc.listfunds()["channels"][0]["state"] == "ONCHAIN") +def test_recover_nodes_for_gossip(): + """Verify nodes_for_gossip bootstrap addresses in plugins/recover.c.""" + with open("plugins/recover.c", "r", encoding="utf-8", errors="ignore") as f: + content = f.read() + + match = re.search(r"nodes_for_gossip\[\]\s*=\s*\{([^}]+)\};", content) + assert match, "Could not find nodes_for_gossip in plugins/recover.c" + + entries = [] + for line in match.group(1).splitlines(): + line = line.strip() + if not line or line.startswith("//"): + continue + str_match = re.search(r'"([^"]+)"', line) + if str_match: + entries.append(str_match.group(1)) + + assert len(entries) == 10 + for e in entries: + assert "@" in e + assert e.count("@") == 1 + node_id, host = e.split("@") + assert len(node_id) == 66 + int(node_id, 16) + + def test_commitfee_option(node_factory): """Sanity check for the --commit-fee startup option.""" l1, l2 = node_factory.get_nodes(2, opts=[{"commit-fee": "200",