'Monitor a given transaction ID. Returns a Deferred that fires when the transaction is present.'

def monitor_transaction(self, txid):

    monitor_deferred = Deferred()
    @inlineCallbacks
    def monitor_loop():
        transactions = (yield self.get_transactions())
        for transaction in transactions:
            if (transaction['id'] == txid):
                self._logger.debug('Found    transaction    with    id    %s', txid)
                monitor_deferred.callback(None)
                monitor_lc.stop()
    self._logger.debug('Start    polling    for    transaction    %s', txid)
    monitor_lc = LoopingCall(monitor_loop)
    monitor_lc.start(1)
    return monitor_deferred
