'Validate a transaction. Transaction must also not be in any VALID
block.
Args:
tx_dict (dict): the transaction to validate
block_id (str): the id of block containing the transaction
num_tx (int): the total number of transactions to process
Returns:
Three values are returned, the validity of the transaction,
``block_id``, ``num_tx``.'

def validate_tx(self, tx_dict, block_id, num_tx):

    try:
        tx = Transaction.from_dict(tx_dict)
        new = self.bigchain.is_new_transaction(tx.id, exclude_block_id=block_id)
        if (not new):
            raise exceptions.ValidationError('Tx    already    exists,    %s', tx.id)
        tx.validate(self.bigchain)
        valid = True
    except exceptions.ValidationError as e:
        valid = False
        logger.warning('Invalid    tx:    %s', e)
    return (valid, block_id, num_tx)
