You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use DeferredChainMonitor for non-VSS storage backends
This change uses LDK's DeferredChainMonitor for local storage backends
(SQLite, filesystem) instead of the regular ChainMonitor. The deferred
variant queues watch_channel and update_channel operations for later
flushing, enabling safe persistence ordering where the ChannelManager
is persisted before the channel monitors. This ensures crash safety.
VSS storage backends continue to use the regular ChainMonitor since
VSS handles its own persistence ordering.
The implementation:
- Adds ChainMonitor enum that wraps both Regular and Deferred variants
- Implements all required traits (Watch, Listen, Confirm, AChainMonitor,
BaseMessageHandler, SendOnlyMessageHandler, EventsProvider) for the enum
- Adds use_deferred_chain_monitor parameter to build_with_store_internal
- Updates VSS build methods to use regular ChainMonitor (false)
- Updates non-VSS build methods to use DeferredChainMonitor (true)
Co-Authored-By: Claude Opus 4.5 <[email protected]>
0 commit comments