]> git.bitcoin.ninja Git - rust-lightning/commit
Refactor TestCustomMessageHandler
authorshaavan <shaavan.github@gmail.com>
Thu, 23 May 2024 06:10:12 +0000 (11:40 +0530)
committershaavan <shaavan.github@gmail.com>
Thu, 30 May 2024 07:06:58 +0000 (12:36 +0530)
commitb95cfed7bb230d6eea26a404f58070f3affd911f
tree4fe16bd224225731f5f06a29ef6cec2d23166fc2
parent7d5dd6b2994752d9f2ae57538a0b25af475ee90d
Refactor TestCustomMessageHandler

- Introduce a new struct for keeping expectations organized.
- Add a boolean field to track whether a response is expected,
  and hence whether a `reply_path` should be included with the response.
- Update Ping and Pong roles for bidirectional communication.
- Introduce panic for when there is no responder and we were expecting
  to include a `reply_path`.
- Refactor `handle_custom_message` code.
lightning/src/onion_message/functional_tests.rs