Don't pause events for chainsync persistence
authorGursharan Singh <3442979+G8XSU@users.noreply.github.com>
Thu, 7 Mar 2024 19:00:41 +0000 (11:00 -0800)
committerGursharan Singh <3442979+G8XSU@users.noreply.github.com>
Fri, 26 Apr 2024 21:37:41 +0000 (14:37 -0700)
commitcb86399f2e61afb21e935d4084bc7fc0a6bf5afa
treea14446b132fb20ffa4810372207c68caef6393af
parent9a438eea3b7ba3c18a36a9c257546fb28f536a50
Don't pause events for chainsync persistence

We used to wait on ChannelMonitor persistence to avoid
duplicate payment events. But this can still happen in cases where
ChannelMonitor handed the event to ChannelManager and we did not persist
ChannelManager after event handling.
It is expected to receive payment duplicate events and clients should handle these
events in an idempotent manner. Removing this hold-up of events simplifies
the logic and makes it easier to not persist ChannelMonitors on every block connect.
lightning/src/chain/chainmonitor.rs
lightning/src/ln/payment_tests.rs