def get_new_block(self):
    last_block_number = self.get_last_block_number()

    logging.debug("last_block_number: %r" % last_block_number)

    if last_block_number == 0:
      last_block_number = self.set_last_block()

    newer_block = last_block_number + 1

    block_hash = self.btc.get_block_hash(newer_block)

    logging.info("block hash: %r" % block_hash)
    if not block_hash:
      return None

    block = self.btc.get_block(block_hash)

    # We are waiting for enough confirmations
    if CONFIRMATIONS < block['confirmations']:
      return None

    logging.info("New block {}".format(newer_block))
    return block
dataset/ETHPy150Open orisi/orisi/src/oracle/oracle.py/Oracle.get_new_block/swapped operands of `<`