@@ -429,6 +429,7 @@ pub(crate) struct DecodedOnionFailure {
429429 pub ( crate ) network_update : Option < NetworkUpdate > ,
430430 pub ( crate ) short_channel_id : Option < u64 > ,
431431 pub ( crate ) payment_failed_permanently : bool ,
432+ pub ( crate ) node_id : Option < PublicKey > ,
432433 pub ( crate ) onion_error_code : Option < u16 > ,
433434 #[ cfg( test) ]
434435 pub ( crate ) onion_error_data : Option < Vec < u8 > > ,
@@ -724,7 +725,7 @@ pub(super) fn process_onion_failure<T: secp256k1::Signing, L: Deref>(
724725 network_update, short_channel_id, payment_failed_permanently, node_id
725726 } ) = res {
726727 DecodedOnionFailure {
727- network_update, short_channel_id, payment_failed_permanently,
728+ network_update, short_channel_id, payment_failed_permanently, node_id ,
728729 onion_error_code : error_code_ret,
729730 #[ cfg( test) ]
730731 onion_error_data : error_packet_ret
@@ -734,7 +735,7 @@ pub(super) fn process_onion_failure<T: secp256k1::Signing, L: Deref>(
734735 // payment not retryable only when garbage is from the final node
735736 DecodedOnionFailure {
736737 network_update : None , short_channel_id : None , payment_failed_permanently : is_from_final_node,
737- onion_error_code : None ,
738+ node_id : None , onion_error_code : None ,
738739 #[ cfg( test) ]
739740 onion_error_data : None
740741 }
@@ -880,6 +881,7 @@ impl HTLCFailReason {
880881 network_update : None ,
881882 payment_failed_permanently : false ,
882883 short_channel_id : Some ( path. hops [ 0 ] . short_channel_id ) ,
884+ node_id : Some ( path. hops [ 0 ] . pubkey ) ,
883885 onion_error_code : Some ( * failure_code) ,
884886 #[ cfg( test) ]
885887 onion_error_data : Some ( data. clone ( ) ) ,
0 commit comments