Given a history ID, see if it already exists
        at the given block ID (i.e. it's not expired),
        using the given collision state.
        Return True if so; False if not.
        If there is a collision, set the __collided__ field in each checked_ops that
        has a matching history_id value and has an opcode in affected_opcodes.

def check_collision_state( cls, collision_state, history_id_key, history_id, block_id, checked_ops, affected_opcodes ):
        """
        Given a history ID, see if it already exists
        at the given block ID (i.e. it's not expired),
        using the given collision state.
        Return True if so; False if not.
        If there is a collision, set the __collided__ field in each checked_ops that
        has a matching history_id value and has an opcode in affected_opcodes.
        """

        # seen before in this block?
        if collision_state.has_key( block_id ):
            if collision_state[block_id].has_key(history_id_key):
                if history_id in collision_state[block_id][history_id_key]:
                    rc = True

                else:
                    collision_state[block_id][history_id_key].append( history_id )
                    rc = False

            else:
                collision_state[block_id][history_id_key] = [history_id]
                rc = False

        else:
            collision_state[block_id] = { history_id_key: [history_id] }
            rc = False

        if not rc:
            # no collision 
            return rc

        # find and mark collided operations 
        for prev_op in checked_ops:

            prev_opcode = op_get_opcode_name( prev_op['op'] )
            if prev_opcode not in affected_opcodes:
                # not affected
                continue 

            if history_id_key not in prev_op:
                # won't match
                continue

            if prev_op[history_id_key] == history_id:
                # collision 
                cls.nameop_set_collided( prev_op, history_id_key, history_id )

        return True