@@ -2027,8 +2027,8 @@ impl HTLCFailReason {
2027
2027
// failures here, but that would be insufficient as find_route
2028
2028
// generally ignores its view of our own channels as we provide them via
2029
2029
// ChannelDetails.
2030
- if let & HTLCSource :: OutboundRoute { ref path , .. } = htlc_source {
2031
- DecodedOnionFailure {
2030
+ match htlc_source {
2031
+ HTLCSource :: OutboundRoute { ref path , .. } => DecodedOnionFailure {
2032
2032
network_update : None ,
2033
2033
payment_failed_permanently : false ,
2034
2034
short_channel_id : Some ( path. hops [ 0 ] . short_channel_id ) ,
@@ -2038,9 +2038,19 @@ impl HTLCFailReason {
2038
2038
onion_error_code : Some ( failure_reason. failure_code ( ) ) ,
2039
2039
#[ cfg( any( test, feature = "_test_utils" ) ) ]
2040
2040
onion_error_data : Some ( data. clone ( ) ) ,
2041
- }
2042
- } else {
2043
- unreachable ! ( ) ;
2041
+ } ,
2042
+ HTLCSource :: TrampolineForward { ref hops, .. } => DecodedOnionFailure {
2043
+ network_update : None ,
2044
+ payment_failed_permanently : false ,
2045
+ short_channel_id : hops. first ( ) . map ( |h| h. short_channel_id ) ,
2046
+ failed_within_blinded_path : false ,
2047
+ hold_times : Vec :: new ( ) ,
2048
+ #[ cfg( any( test, feature = "_test_utils" ) ) ]
2049
+ onion_error_code : Some ( failure_reason. failure_code ( ) ) ,
2050
+ #[ cfg( any( test, feature = "_test_utils" ) ) ]
2051
+ onion_error_data : Some ( data. clone ( ) ) ,
2052
+ } ,
2053
+ _ => unreachable ! ( ) ,
2044
2054
}
2045
2055
} ,
2046
2056
}
0 commit comments