]> git.bitcoin.ninja Git - rust-lightning/commit
Make event handling fallible
authorElias Rohrer <dev@tnull.de>
Mon, 15 Apr 2024 08:35:52 +0000 (10:35 +0200)
committerElias Rohrer <dev@tnull.de>
Thu, 18 Jul 2024 13:54:21 +0000 (15:54 +0200)
commit018908fe9e23f3994ea1a015cdb955708ac5fdc1
tree7d8e8afff66b7fe509fa1bcf41b9c2e549bacd44
parentb5b57f188f2a65b2dbdc49616463437abbb8e073
Make event handling fallible

Previously, we would require our users to handle all events
successfully inline or panic will trying to do so. If they would exit
the `EventHandler` any other way we'd forget about the event and
wouldn't replay them after restart.

Here, we implement fallible event handling, allowing the user to return
`Err(())` which signals to our event providers they should abort event
processing and replay any unhandled events later (i.e., in the next
invocation).
lightning-background-processor/src/lib.rs
lightning-invoice/src/utils.rs
lightning/src/chain/chainmonitor.rs
lightning/src/chain/channelmonitor.rs
lightning/src/events/mod.rs
lightning/src/ln/channelmanager.rs
lightning/src/onion_message/functional_tests.rs
lightning/src/onion_message/messenger.rs
lightning/src/util/async_poll.rs