Introduce ResponseInstruction::WithReplyPath variant.
authorshaavan <shaavan.github@gmail.com>
Mon, 15 Apr 2024 10:55:03 +0000 (16:25 +0530)
committershaavan <shaavan.github@gmail.com>
Thu, 30 May 2024 07:06:56 +0000 (12:36 +0530)
commit6904786ed4edd1fe5d85a5b886aa4be86052f338
treec6035cec44cdebb0db6501e055395bab5b045132
parentca5b6b51d16662d968bb7b49a28ae5c65ed8493f
Introduce ResponseInstruction::WithReplyPath variant.

And expand handle_onion_message_response return Type

1. Introduce a new function in OnionMessenger to create blinded paths.
2. Use it in handle_onion_message_response to create a reply_path for
   the right variant and use it in onion_message.
3. Expand the return type of handle_onion_message_response to handle three cases:
1. Ok(None) in case of no response to be sent.
2. Ok(Some(SendSuccess) and Err(SendError) in case of successful and
    unsuccessful queueing up of response messages respectively.

This allows the user to get access to the Success/Failure status of the sending
of response and handle it accordingly.
lightning/src/onion_message/functional_tests.rs
lightning/src/onion_message/messenger.rs