Repository navigation
Avoid holding a per_peer_state lock while claiming from a monitor - #2163
Conversation
There's no reason to hold a lock on `per_peer_state` while we're claiming from a since-closed channel via a `ChannelMonitorUpdate`, which we stop doing here.
| Some((cp_id, _dup_chan_id)) => Some(cp_id.clone()), | ||
| None => None | ||
| }; | ||
| { |
There was a problem hiding this comment.
nit: I'd slightly prefer mem::drop since there was already 7 levels of indentation in some places, but whatevs
There was a problem hiding this comment.
I tried....the borrow checker here is....really really angry. I may have overlooked some other option, but it was a real fight :(
Codecov ReportPatch coverage:
📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more Additional details and impacted files@@ Coverage Diff @@
## main #2163 +/- ##
==========================================
- Coverage 91.31% 91.30% -0.02%
==========================================
Files 102 102
Lines 49981 49981
Branches 49981 49981
==========================================
- Hits 45641 45633 -8
- Misses 4340 4348 +8
... and 2 files with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
There's no reason to hold a lock on
per_peer_statewhile we're claiming from a since-closed channel via aChannelMonitorUpdate, which we stop doing here.Required for some future work but a trivial change that stands on its own.