def run_bind_test(self, allow_ips, connect_to, addresses, expected):
    '\n        Start a node with requested rpcallowip and rpcbind parameters,\n        then try to connect, and check if the set of bound addresses\n        matches the expected set.\n        '
    self.log.info(('Bind test for %s' % str(addresses)))
    expected = [(addr_to_hex(addr), port) for (addr, port) in expected]
    base_args = ['-disablewallet', '-nolisten']
    if allow_ips:
        base_args += [('-rpcallowip=' + x) for x in allow_ips]
    binds = [('-rpcbind=' + addr) for addr in addresses]
    self.nodes[0].rpchost = connect_to
    self.start_node(0, (base_args + binds))
    pid = self.nodes[0].process.pid
    assert_equal(set(get_bind_addrs(pid)), set(expected))
    self.stop_nodes()
Start a node with requested rpcallowip and rpcbind parameters,
then try to connect, and check if the set of bound addresses
matches the expected set.
def run_bind_test(self, allow_ips, connect_to, addresses, expected):
    '\n        Start a node with requested rpcallowip and rpcbind parameters,\n        then try to connect, and check if the set of bound addresses\n        matches the expected set.\n        '
    self.log.info(('Bind test for %s' % str(addresses)))
    expected = [(addr_to_hex(addr), port) for (addr, port) in expected]
    base_args = ['-disablewallet', '-nolisten']
    if allow_ips:
        base_args += [('-rpcallowip=' + x) for x in allow_ips]
    binds = [('-rpcbind=' + addr) for addr in addresses]
    self.nodes[0].rpchost = connect_to
    self.start_node(0, (base_args + binds))
    pid = self.nodes[0].process.pid
    assert_equal(set(get_bind_addrs(pid)), set(expected))
    self.stop_nodes()