connectd: ignore private remote_addr on non-DEVELOPER builds

When compiled without DEVELOPER this will now filter out `remote_addr` that
come from localhost. The testcase checks for DEVELOPER to test for correct
function of `remote_addr`.

Also, I renamed "test_connect" to "test_connect_basic" so it can be started
without all the other tests in that file that start with "test_connect..."
This commit is contained in:
Michael Schmoock
2022-02-24 16:48:16 +01:00
committed by Rusty Russell
parent a01e2740ef
commit f1981461ef
3 changed files with 12 additions and 5 deletions

View File

@@ -452,6 +452,7 @@ def test_plugin_connected_hook_chaining(node_factory):
@unittest.skipIf(not EXPERIMENTAL_FEATURES, "BOLT1 remote_addr #917")
@pytest.mark.developer("localhost remote_addr will be filtered without DEVELOEPR")
def test_peer_connected_remote_addr(node_factory):
"""This tests the optional tlv `remote_addr` being passed to a plugin.