Browse Source

follow-up dd0be1541e

dependabot/pip/contrib/deterministic-build/ecdsa-0.13.3
ThomasV 5 years ago
parent
commit
5377eb907c
  1. 4
      electrum/channel_db.py
  2. 2
      electrum/lnworker.py

4
electrum/channel_db.py

@ -387,7 +387,7 @@ class ChannelDB(SqlDB):
# the update may be categorized as deprecated because of caching
categorized_chan_upds = self.add_channel_updates([payload], verify=False)
def handle_error_code_from_failed_htlc(self, code, data, sender_idx, route):
def handle_error_code_from_failed_htlc(self, code, data, sender_idx, route, peer):
# handle some specific error codes
failure_codes = {
OnionFailureCode.TEMPORARY_CHANNEL_FAILURE: 0,
@ -414,7 +414,7 @@ class ChannelDB(SqlDB):
blacklist = False
if categorized_chan_upds.good:
self.logger.info("applied channel update on our db")
#self.maybe_save_remote_update(payload)
peer.maybe_save_remote_update(payload)
elif categorized_chan_upds.orphaned:
# maybe it is a private channel (and data in invoice was outdated)
self.logger.info("maybe channel update is for private channel?")

2
electrum/lnworker.py

@ -891,7 +891,7 @@ class LNWallet(LNWorker):
code, data = failure_msg.code, failure_msg.data
self.logger.info(f"UPDATE_FAIL_HTLC {repr(code)} {data}")
self.logger.info(f"error reported by {bh2u(route[sender_idx].node_id)}")
self.channel_db.handle_error_code_from_failed_htlc(code, data, sender_idx, route)
self.channel_db.handle_error_code_from_failed_htlc(code, data, sender_idx, route, peer)
return success, preimage, failure_node_id, failure_msg
@staticmethod

Loading…
Cancel
Save