electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit 5377eb907c863b9e750d15d15ce9251c28dbcf45
parent 2a604b1676680859d5ddb84f132ec39a6c1b5c80
Author: ThomasV <thomasv@electrum.org>
Date:   Sat, 12 Oct 2019 12:59:38 +0200

follow-up dd0be1541eb696d6a41420178543f2c36d20f80e

Diffstat:
Melectrum/channel_db.py | 4++--
Melectrum/lnworker.py | 2+-
2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/electrum/channel_db.py b/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?") diff --git a/electrum/lnworker.py b/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