(self)
| 74 | # Don't start the nodes, as some of them would collide trying to bind on the same port. |
| 75 | |
| 76 | def run_test(self): |
| 77 | for i in range(len(self.expected)): |
| 78 | self.log.info(f"Starting node {i} with {self.expected[i][0]}") |
| 79 | self.start_node(i) |
| 80 | pid = self.nodes[i].process.pid |
| 81 | binds = set(get_bind_addrs(pid)) |
| 82 | # Remove IPv6 addresses because on some CI environments "::1" is not configured |
| 83 | # on the system (so our test_ipv6_local() would return False), but it is |
| 84 | # possible to bind on "::". This makes it unpredictable whether to expect |
| 85 | # that bitcoind has bound on "::1" (for RPC) and "::" (for P2P). |
| 86 | ipv6_addr_len_bytes = 32 |
| 87 | binds = set(filter(lambda e: len(e[0]) != ipv6_addr_len_bytes, binds)) |
| 88 | # Remove RPC ports. They are not relevant for this test. |
| 89 | binds = set(filter(lambda e: e[1] != rpc_port(i), binds)) |
| 90 | assert_equal(binds, set(self.expected[i][1])) |
| 91 | self.stop_node(i) |
| 92 | self.log.info(f"Stopped node {i}") |
| 93 | |
| 94 | if __name__ == '__main__': |
| 95 | BindExtraTest().main() |
nothing calls this directly
no test coverage detected