Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion lightning-liquidity/src/lsps2/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -619,7 +619,7 @@ impl PeerState {
self.needs_persist |= true;
}

fn prune_expired_request_state(&mut self) {
fn prune_pending_requests(&mut self) {
self.pending_requests.retain(|_, entry| {
match entry {
LSPS2Request::GetInfo(_) => false,
Expand All @@ -629,7 +629,9 @@ impl PeerState {
},
}
});
}

fn prune_expired_request_state(&mut self) {
self.outbound_channels_by_intercept_scid.retain(|intercept_scid, entry| {
if entry.is_prunable() {
// We abort the flow, and prune any data kept.
Expand Down Expand Up @@ -1875,6 +1877,7 @@ where
let mut peer_state_lock = inner_state_lock.lock().unwrap();
// We clean up the peer state, but leave removing the peer entry to the prune logic in
// `persist` which removes it from the store.
peer_state_lock.prune_pending_requests();
peer_state_lock.prune_expired_request_state();
}
}
Expand Down
Loading