warn ==> warning

This commit is contained in:
Salvatore Ingala
2019-10-10 18:35:31 +07:00
parent 9f25ef8603
commit d05c2c21b7
2 changed files with 9 additions and 9 deletions

View File

@@ -29,5 +29,5 @@ class Logger(object):
def error(self, msg, **kwargs): def error(self, msg, **kwargs):
logging.error(StructuredMessage(self._add_prefix(msg), actor=self.actor, **kwargs)) logging.error(StructuredMessage(self._add_prefix(msg), actor=self.actor, **kwargs))
def warn(self, msg, **kwargs): def warning(self, msg, **kwargs):
logging.warn(StructuredMessage(self._add_prefix(msg), actor=self.actor, **kwargs)) logging.warning(StructuredMessage(self._add_prefix(msg), actor=self.actor, **kwargs))

View File

@@ -126,9 +126,9 @@ class Responder:
self.rebroadcast(txs_to_rebroadcast) self.rebroadcast(txs_to_rebroadcast)
else: else:
logger.warn("Reorg found", logger.warning("Reorg found",
local_prev_block_hash=prev_block_hash, local_prev_block_hash=prev_block_hash,
remote_prev_block_hash=block.get('previousblockhash')) remote_prev_block_hash=block.get('previousblockhash'))
self.handle_reorgs() self.handle_reorgs()
@@ -174,9 +174,9 @@ class Responder:
self.add_response(uuid, self.jobs[uuid].dispute_txid, self.jobs[uuid].justice_txid, self.add_response(uuid, self.jobs[uuid].dispute_txid, self.jobs[uuid].justice_txid,
self.jobs[uuid].justice_rawtx, self.jobs[uuid].appointment_end, retry=True) self.jobs[uuid].justice_rawtx, self.jobs[uuid].appointment_end, retry=True)
logger.warn("Transaction has missed many confirmations. Rebroadcasting.", logger.warning("Transaction has missed many confirmations. Rebroadcasting.",
justice_txid=self.jobs[uuid].justice_txid, justice_txid=self.jobs[uuid].justice_txid,
confirmations_missed=CONFIRMATIONS_BEFORE_RETRY) confirmations_missed=CONFIRMATIONS_BEFORE_RETRY)
# FIXME: Legacy code, must be checked and updated/fixed # FIXME: Legacy code, must be checked and updated/fixed
def handle_reorgs(self): def handle_reorgs(self):
@@ -210,5 +210,5 @@ class Responder:
# ToDo: #24-properly-handle-reorgs # ToDo: #24-properly-handle-reorgs
# FIXME: if the dispute is not on chain (either in mempool or not there at all), we need to call the # FIXME: if the dispute is not on chain (either in mempool or not there at all), we need to call the
# reorg manager # reorg manager
logger.warn("Dispute and justice transaction missing. Calling the reorg manager") logger.warning("Dispute and justice transaction missing. Calling the reorg manager")
logger.error("Reorg manager not yet implemented") logger.error("Reorg manager not yet implemented")