connectd: use dev_allow_localhost for remote_addr testing

Before this fix, there was the situation where a DEVELOPER=1 node would
announce non-public addresses on mainnet if detected. Since there
are some nodes on the internet that falsely report local addresses
we move this 'testing feature' to 'dev-allow-locahost' nodes.

Changelog-None
This commit is contained in:
Michael Schmoock
2022-06-01 12:14:56 +02:00
committed by Rusty Russell
parent 32c4540fc0
commit a2b75b66ba
3 changed files with 38 additions and 18 deletions

View File

@@ -458,7 +458,10 @@ def test_peer_connected_remote_addr(node_factory):
The optional tlv `remote_addr` should only be visible to the initiator l1.
"""
l1, l2 = node_factory.get_nodes(2, opts={'plugin': os.path.join(os.getcwd(), 'tests/plugins/peer_connected_logger_a.py')})
pluginpath = os.path.join(os.getcwd(), 'tests/plugins/peer_connected_logger_a.py')
l1, l2 = node_factory.get_nodes(2, opts={
'plugin': pluginpath,
'dev-allow-localhost': None})
l1id = l1.info['id']
l2id = l2.info['id']