@@ -1436,18 +1436,15 @@ where
1436
1436
"Received an onion message with path_id {:02x?} and {} reply_path: {:?}" ,
1437
1437
path_id, if reply_path. is_some( ) { "a" } else { "no" } , message) ;
1438
1438
1439
+ let responder = reply_path. map (
1440
+ |reply_path| Responder :: new ( reply_path, path_id)
1441
+ ) ;
1439
1442
match message {
1440
1443
ParsedOnionMessageContents :: Offers ( msg) => {
1441
- let responder = reply_path. map (
1442
- |reply_path| Responder :: new ( reply_path, path_id)
1443
- ) ;
1444
1444
let response_instructions = self . offers_handler . handle_message ( msg, responder) ;
1445
1445
let _ = self . handle_onion_message_response ( response_instructions) ;
1446
1446
} ,
1447
1447
ParsedOnionMessageContents :: AsyncPayments ( AsyncPaymentsMessage :: HeldHtlcAvailable ( msg) ) => {
1448
- let responder = reply_path. map (
1449
- |reply_path| Responder :: new ( reply_path, path_id)
1450
- ) ;
1451
1448
let response_instructions = self . async_payments_handler . held_htlc_available (
1452
1449
msg, responder
1453
1450
) ;
@@ -1457,9 +1454,6 @@ where
1457
1454
self . async_payments_handler . release_held_htlc ( msg) ;
1458
1455
} ,
1459
1456
ParsedOnionMessageContents :: Custom ( msg) => {
1460
- let responder = reply_path. map (
1461
- |reply_path| Responder :: new ( reply_path, path_id)
1462
- ) ;
1463
1457
let response_instructions = self . custom_handler . handle_custom_message ( msg, responder) ;
1464
1458
let _ = self . handle_onion_message_response ( response_instructions) ;
1465
1459
} ,
0 commit comments