thandle_error_code_from_failed_htlc: fix logic bug - electrum - Electrum Bitcoin wallet (HTM) git clone https://git.parazyd.org/electrum (DIR) Log (DIR) Files (DIR) Refs (DIR) Submodules --- (DIR) commit 85841ba20de7cb6459066538474d3f13e010031e (DIR) parent 41d9c1988f7d7f224db51775ba2e5ca9253fd9ae (HTM) Author: SomberNight <somber.night@protonmail.com> Date: Mon, 22 Jun 2020 04:02:51 +0200 handle_error_code_from_failed_htlc: fix logic bug tthe two asserts are supposed to be identical (one was negated) Diffstat: M electrum/lnworker.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- (DIR) diff --git a/electrum/lnworker.py b/electrum/lnworker.py t@@ -935,13 +935,13 @@ class LNWallet(LNWorker): # we try decoding both ways here. try: message_type, payload = decode_msg(channel_update_typed) - assert payload['chain_hash'] == constants.net.rev_genesis_bytes() + if not payload['chain_hash'] != constants.net.rev_genesis_bytes(): raise Exception() payload['raw'] = channel_update_typed except: # FIXME: too broad try: message_type, payload = decode_msg(channel_update_as_received) + if not payload['chain_hash'] != constants.net.rev_genesis_bytes(): raise Exception() payload['raw'] = channel_update_as_received - assert payload['chain_hash'] != constants.net.rev_genesis_bytes() except: self.logger.info(f'could not decode channel_update for failed htlc: {channel_update_as_received.hex()}') return True