Add AChainMonitor trait and use it in background processor#4371
Add AChainMonitor trait and use it in background processor#4371TheBlueMatt merged 1 commit intolightningdevkit:mainfrom
Conversation
|
👋 Thanks for assigning @TheBlueMatt as a reviewer! |
620fc4b to
9c9c9b3
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4371 +/- ##
==========================================
+ Coverage 85.99% 86.01% +0.01%
==========================================
Files 156 156
Lines 102766 102781 +15
Branches 102766 102781 +15
==========================================
+ Hits 88378 88409 +31
+ Misses 11879 11864 -15
+ Partials 2509 2508 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
b99f6ee to
0a38e48
Compare
Add a new `AChainMonitor` trait following the same pattern as `AChannelManager`. This trait provides associated types for all generic parameters of `ChainMonitor` and a `get_cm()` method to access the underlying `ChainMonitor`. Update the background processor to use `AChainMonitor` trait bounds instead of spelling out the full `ChainMonitor` generic parameters. This simplifies the function signatures by removing 5-6 explicit generic parameters (CF, T, F, P, ES) per function. This is preparation for adding a flush method to the AChainMonitor trait. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
0a38e48 to
4800a47
Compare
|
Verified that this is indeed going to work with deferred writes (#4317) and ldk-node integration (lightningdevkit/ldk-node#782) |
|
👋 The first review has been submitted! Do you think this PR is ready for a second reviewer? If so, click here to assign a second reviewer. |
|
Eh, just gonna merge this even though it "broke" semver. but semver is already broken cause BP depends on |
Add a new
AChainMonitortrait following the same pattern asAChannelManager. This trait provides associated types for all generic parameters ofChainMonitorand aget_cm()method to access the underlyingChainMonitor.Update the background processor to use
AChainMonitortrait bounds instead of spelling out the fullChainMonitorgeneric parameters. This simplifies the function signatures by removing 5-6 explicit generic parameters (CF, T, F, P, ES) per function.This is preparation for adding a flush method to the AChainMonitor trait.