return TRAMPOLINE_FEE_INSUFFICIENT instead of UNKNOWN_NEXT_PEER on payment failure in forwarding
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user