handle_error_code_from_failed_htlc: fix logic bug
the two asserts are supposed to be identical (one was negated)
This commit is contained in:
@@ -935,13 +935,13 @@ class LNWallet(LNWorker):
|
|||||||
# we try decoding both ways here.
|
# we try decoding both ways here.
|
||||||
try:
|
try:
|
||||||
message_type, payload = decode_msg(channel_update_typed)
|
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
|
payload['raw'] = channel_update_typed
|
||||||
except: # FIXME: too broad
|
except: # FIXME: too broad
|
||||||
try:
|
try:
|
||||||
message_type, payload = decode_msg(channel_update_as_received)
|
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
|
payload['raw'] = channel_update_as_received
|
||||||
assert payload['chain_hash'] != constants.net.rev_genesis_bytes()
|
|
||||||
except:
|
except:
|
||||||
self.logger.info(f'could not decode channel_update for failed htlc: {channel_update_as_received.hex()}')
|
self.logger.info(f'could not decode channel_update for failed htlc: {channel_update_as_received.hex()}')
|
||||||
return True
|
return True
|
||||||
|
|||||||
Reference in New Issue
Block a user