def atlas_init(blockstack_opts, db, recover=False, port=None):
    """
    Start up atlas functionality
    """
    if port is None:
        port = blockstack_opts['rpc_port']

    # start atlas node
    atlas_state = None
    if is_atlas_enabled(blockstack_opts):
        atlas_seed_peers = filter( lambda x: len(x) > 0, blockstack_opts['atlas_seeds'].split(","))
        atlas_blacklist = filter( lambda x: len(x) > 0, blockstack_opts['atlas_blacklist'].split(","))
        zonefile_dir = blockstack_opts['zonefiles']
        my_hostname = blockstack_opts['atlas_hostname']
        my_port = blockstack_opts['atlas_port']

        initial_peer_table = atlasdb_init(blockstack_opts['atlasdb_path'], zonefile_dir, db, atlas_seed_peers, atlas_blacklist, validate=True, recover=recover)
        atlas_peer_table_init(initial_peer_table)

        atlas_state = atlas_node_init(my_hostname, my_port, blockstack_opts['atlasdb_path'], zonefile_dir, db.working_dir)

    return atlas_state
Start up atlas functionality