Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce check for dangling RAA blockers in test_utils #3504

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

shaavan
Copy link
Member

@shaavan shaavan commented Jan 3, 2025

Partially addresses #3381

Summary

This PR addresses the issue of unhandled dangling RAA blockers during testing by introducing a check in Node::Drop().

Changes:

  1. Added a validation in Node::Drop() to ensure no dangling RAA blockers remain unhandled.
  2. Updated the test to handle RAA blockers, fixing the failure caused by the new validation.

Note:
The `actions_blocking_raa_monitor_updates` list may contain stale entries
in the form of `(channel_id, [])`, which do not represent actual dangling actions.

To handle this, stale entries are ignored when accumulating pending actions
before clearing them. This ensures that the logic focuses only on relevant
actions and avoids unnecessary accumulation of already processed data.
@shaavan
Copy link
Member Author

shaavan commented Jan 8, 2025

Updated from pr3504.01 to pr3504.02 (diff):
Addressed @jkczyz comments

Changes:

  1. Updated get_and_clear_raa_blockers to pub(crate) to eliminate redundant test-specific declarations for other structs.

Copy link

codecov bot commented Jan 8, 2025

Codecov Report

Attention: Patch coverage is 92.10526% with 3 lines in your changes missing coverage. Please review.

Project coverage is 88.34%. Comparing base (85d1e5f) to head (1d95abe).
Report is 5 commits behind head on main.

Files with missing lines Patch % Lines
lightning/src/ln/chanmon_update_fail_tests.rs 90.00% 2 Missing ⚠️
lightning/src/ln/functional_test_utils.rs 75.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3504      +/-   ##
==========================================
+ Coverage   88.32%   88.34%   +0.01%     
==========================================
  Files         149      149              
  Lines      112912   113080     +168     
  Branches   112912   113080     +168     
==========================================
+ Hits        99731    99898     +167     
- Misses      10694    10696       +2     
+ Partials     2487     2486       -1     

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

@jkczyz jkczyz requested a review from TheBlueMatt January 9, 2025 22:58
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.

2 participants