Stop relying on ChannelMonitor persistence after manager read
When we discover we've only partially claimed an MPP HTLC during
ChannelManager reading, we need to add the payment preimage to
all other ChannelMonitors that were a part of the payment.
We previously did this with a direct call on the ChannelMonitor,
requiring users write the full ChannelMonitor to disk to ensure
that updated information made it.
This adds quite a bit of delay during initial startup - fully
resilvering each ChannelMonitor just to handle this one case is
incredibly excessive.
Instead, we rewrite the MPP claim replay logic to use only (new) data included in ChannelMonitors, which has a nice side-effect of teeing up future ChannelManager-non-persistence features as well as makes our PaymentClaimed event generation much more robust.
A bunch of tests are still trying to call provide_payment_preimage()
Ugh, sorry, fixed. Also rebased and fixed an issue introduced in #3303
Codecov Report
Attention: Patch coverage is 90.65657% with 37 lines in your changes missing coverage. Please review.
Project coverage is 89.66%. Comparing base (
a661c92) to head (b0fa756).
Additional details and impacted files
@@ Coverage Diff @@
## main #3322 +/- ##
==========================================
- Coverage 89.68% 89.66% -0.02%
==========================================
Files 126 126
Lines 103168 103370 +202
Branches 103168 103370 +202
==========================================
+ Hits 92522 92686 +164
- Misses 7934 7971 +37
- Partials 2712 2713 +1
| Flag | Coverage Δ | |
|---|---|---|
89.66% <90.65%> (-0.02%) |
:arrow_down: |
Flags with carried forward coverage won't be shown. Click here to find out more.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Tagging 0.1 because of the first commit.
Squashed fixups and rebased to tell clippy to shut up.
LGTM after squash.
Squashed without further changes.