Skip to content

Conversation

joostjager
Copy link
Contributor

This makes it impossible to forget to reinitialize the sleeper and poll a future that is already ready.

This makes it impossible to forget to reinitialize the sleeper and poll
a future that is already ready.
@ldk-reviews-bot
Copy link

ldk-reviews-bot commented Jul 31, 2025

👋 Thanks for assigning @TheBlueMatt as a reviewer!
I'll wait for their review and will help manage the review process.
Once they submit their review, I'll check if a second reviewer would be helpful.

Copy link

codecov bot commented Jul 31, 2025

Codecov Report

❌ Patch coverage is 89.65517% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 88.90%. Comparing base (664511b) to head (d91575d).
⚠️ Report is 5 commits behind head on main.

Files with missing lines Patch % Lines
lightning-background-processor/src/lib.rs 89.65% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3978      +/-   ##
==========================================
- Coverage   88.91%   88.90%   -0.01%     
==========================================
  Files         174      174              
  Lines      124232   124230       -2     
  Branches   124232   124230       -2     
==========================================
- Hits       110455   110447       -8     
- Misses      11301    11303       +2     
- Partials     2476     2480       +4     
Flag Coverage Δ
fuzzing 22.61% <ø> (ø)
tests 88.73% <89.65%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@joostjager joostjager marked this pull request as ready for review July 31, 2025 13:39
@joostjager joostjager requested a review from TheBlueMatt July 31, 2025 13:39
Rustfmt is not always processing macros.
Comment on lines +950 to +956
let prune_timer = if gossip_sync.prunable_network_graph().is_some() {
NETWORK_PRUNE_TIMER
} else {
FIRST_NETWORK_PRUNE_TIMER
};
let prune_timer_elapsed = {
match check_sleeper(&mut last_prune_call) {
match check_and_reset_sleeper(&mut last_prune_call, || sleeper(prune_timer)) {
Copy link
Contributor

@elnosh elnosh Jul 31, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wouldn't this cause the first prune after 60s to not run in the GossipSync::P2P case? since it will override last_prune_call with sleeper after NETWORK_PRUNE_TIMER.

Edit: ignore, it won't.

"Error: Failed to persist scorer, check your disk and permissions {}",
e,
);
log_error!(logger, "Error: Failed to persist scorer, check your disk and permissions {}", e);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this similar log msg from the async version can be fixed as well

Copy link
Collaborator

@TheBlueMatt TheBlueMatt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Straightforward cleanup.

@TheBlueMatt TheBlueMatt merged commit d3dd617 into lightningdevkit:main Jul 31, 2025
24 of 25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants