1
0

return TRAMPOLINE_FEE_INSUFFICIENT instead of UNKNOWN_NEXT_PEER on payment failure in forwarding

This commit is contained in:
f321x
2025-01-15 13:18:11 +01:00
parent dffdebf778
commit c921100de3

View File

@@ -2016,7 +2016,7 @@ class Peer(Logger, EventListener):
self.logger.debug(
f"maybe_forward_trampoline. PaymentFailure for {payment_hash.hex()=}, {payment_secret.hex()=}: {e!r}")
# FIXME: adapt the error code
raise OnionRoutingFailure(code=OnionFailureCode.UNKNOWN_NEXT_PEER, data=b'')
raise OnionRoutingFailure(code=OnionFailureCode.TRAMPOLINE_FEE_INSUFFICIENT, data=b'')
def _maybe_refuse_to_forward_htlc_that_corresponds_to_payreq_we_created(self, payment_hash: bytes) -> bool:
"""Returns True if the HTLC should be failed.