mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-31 01:11:35 +00:00
follow-up prev
This commit is contained in:
parent
2cc76fbbbd
commit
cf5872d2c1
1 changed files with 2 additions and 1 deletions
|
@ -1226,7 +1226,7 @@ class Peer(Logger):
|
|||
self.logger.info(f"fail_htlc. chan {chan.short_channel_id}. htlc_id {htlc_id}. reason: {reason}")
|
||||
assert chan.can_send_ctx_updates(), f"cannot send updates: {chan.short_channel_id}"
|
||||
chan.fail_htlc(htlc_id)
|
||||
if onion_packet:
|
||||
if onion_packet and reason:
|
||||
error_bytes = construct_onion_error(reason, onion_packet, our_onion_private_key=self.privkey)
|
||||
if error_bytes:
|
||||
self.send_message("update_fail_htlc",
|
||||
|
@ -1235,6 +1235,7 @@ class Peer(Logger):
|
|||
len=len(error_bytes),
|
||||
reason=error_bytes)
|
||||
else:
|
||||
assert reason is not None
|
||||
if not (reason.code & OnionFailureCodeMetaFlag.BADONION and len(reason.data) == 32):
|
||||
raise Exception(f"unexpected reason when sending 'update_fail_malformed_htlc': {reason!r}")
|
||||
self.send_message("update_fail_malformed_htlc",
|
||||
|
|
Loading…
Add table
Reference in a new issue