Get the full history of a name
    Returns {'status': True, 'history': ...} on success, where history is grouped by block
    Returns {'error': ...} on error

def get_name_history(name, hostport=None, proxy=None, history_page=None):
    """
    Get the full history of a name
    Returns {'status': True, 'history': ...} on success, where history is grouped by block
    Returns {'error': ...} on error
    """
    assert hostport or proxy, 'Need hostport or proxy'
    if proxy is None:
        proxy = connect_hostport(hostport)

    hist = {}
    indexing = None
    lastblock = None

    if history_page != None:
        resp = get_name_history_page(name, history_page, proxy=proxy)
        if 'error' in resp:
            return resp

        indexing = resp['indexing']
        lastblock = resp['lastblock']

        return {'status': True, 'history': resp['history'], 'indexing': indexing, 'lastblock': lastblock}

    for i in range(0, 100000000):       # this is obviously too big
        resp = get_name_history_page(name, i, proxy=proxy)
        if 'error' in resp:
            return resp

        indexing = resp['indexing']
        lastblock = resp['lastblock']

        if len(resp['history']) == 0:
            # caught up 
            break

        hist = name_history_merge(hist, resp['history'])

    return {'status': True, 'history': hist, 'indexing': indexing, 'lastblock': lastblock}