def METHOD_NAME(self):
    self.nodes[0].add_p2p_connection(P2PInterface())
    # send some addresses to the node via the p2p message addr
    msg = msg_addr()
    imported_addrs = []
    for i in range(256):
        a = "123.123.123.{}".format(i)
        imported_addrs.append(a)
        addr = CAddress()
        addr.time = 100000000
        addr.nServices = NODE_NETWORK | NODE_WITNESS
        addr.ip = a
        addr.port = 8555
        msg.addrs.append(addr)
    self.nodes[0].p2p.send_and_ping(msg)
    # obtain addresses via rpc call and check they were ones sent in before
    REQUEST_COUNT = 10
    node_addresses = self.nodes[0].getnodeaddresses(REQUEST_COUNT)
    assert_equal(len(node_addresses), REQUEST_COUNT)
    for a in node_addresses:
        assert_greater_than(a["time"], 1527811200)  # 1st June 2018
        assert_equal(a["services"], NODE_NETWORK | NODE_WITNESS)
        assert a["address"] in imported_addrs
        assert_equal(a["port"], 8555)
    assert_raises_rpc_error(
        -8, "Address count out of range", self.nodes[0].getnodeaddresses, -1
    )
    # addrman's size cannot be known reliably after insertion, as hash collisions may occur
    # so only test that requesting a large number of addresses returns less than that
    LARGE_REQUEST_COUNT = 10000
    node_addresses = self.nodes[0].getnodeaddresses(LARGE_REQUEST_COUNT)
    assert_greater_than(LARGE_REQUEST_COUNT, len(node_addresses))