@@ -888,11 +888,16 @@ where
888
888
}
889
889
890
890
fn handle_onion_message_response < T : OnionMessageContents > (
891
- & self , response : ResponseInstruction < T > , log_suffix : fmt :: Arguments
891
+ & self , response : ResponseInstruction < T > , message_type : & str , path_id : Option < [ u8 ; 32 ] >
892
892
) {
893
893
if let ResponseInstruction :: WithoutReplyPath ( response) = response {
894
894
let _ = self . find_path_and_enqueue_onion_message (
895
- response. message , Destination :: BlindedPath ( response. reply_path ) , None , log_suffix
895
+ response. message , Destination :: BlindedPath ( response. reply_path ) , None ,
896
+ format_args ! (
897
+ "when responding to {} onion message with path_id {:02x?}" ,
898
+ message_type,
899
+ path_id
900
+ )
896
901
) ;
897
902
}
898
903
}
@@ -978,20 +983,12 @@ where
978
983
ParsedOnionMessageContents :: Offers ( msg) => {
979
984
let responder = reply_path. map ( |path| Responder :: new ( path) ) ;
980
985
let response_instructions = self . offers_handler . handle_message ( msg, responder) ;
981
- self . handle_onion_message_response ( response_instructions, format_args ! (
982
- "when responding to {} onion message with path_id {:02x?}" ,
983
- message_type,
984
- path_id
985
- ) )
986
+ self . handle_onion_message_response ( response_instructions, message_type, path_id) ;
986
987
} ,
987
988
ParsedOnionMessageContents :: Custom ( msg) => {
988
989
let responder = reply_path. map ( |path| Responder :: new ( path) ) ;
989
990
let response_instructions = self . custom_handler . handle_custom_message ( msg, responder) ;
990
- self . handle_onion_message_response ( response_instructions, format_args ! (
991
- "when responding to {} onion message with path_id {:02x?}" ,
992
- message_type,
993
- path_id
994
- ) )
991
+ self . handle_onion_message_response ( response_instructions, message_type, path_id) ;
995
992
} ,
996
993
}
997
994
} ,
0 commit comments