@@ -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+ #[ cfg( test) ]
432433 pub ( crate ) onion_error_code : Option < u16 > ,
433434 #[ cfg( test) ]
434435 pub ( crate ) onion_error_data : Option < Vec < u8 > > ,
@@ -720,6 +721,7 @@ pub(super) fn process_onion_failure<T: secp256k1::Signing, L: Deref>(
720721 } ) = res {
721722 DecodedOnionFailure {
722723 network_update, short_channel_id, payment_failed_permanently,
724+ #[ cfg( test) ]
723725 onion_error_code : error_code_ret,
724726 #[ cfg( test) ]
725727 onion_error_data : error_packet_ret
@@ -729,6 +731,7 @@ pub(super) fn process_onion_failure<T: secp256k1::Signing, L: Deref>(
729731 // payment not retryable only when garbage is from the final node
730732 DecodedOnionFailure {
731733 network_update : None , short_channel_id : None , payment_failed_permanently : is_from_final_node,
734+ #[ cfg( test) ]
732735 onion_error_code : None ,
733736 #[ cfg( test) ]
734737 onion_error_data : None
@@ -875,6 +878,7 @@ impl HTLCFailReason {
875878 network_update : None ,
876879 payment_failed_permanently : false ,
877880 short_channel_id : Some ( path. hops [ 0 ] . short_channel_id ) ,
881+ #[ cfg( test) ]
878882 onion_error_code : Some ( * failure_code) ,
879883 #[ cfg( test) ]
880884 onion_error_data : Some ( data. clone ( ) ) ,
0 commit comments