Skip to content

Remove test util macros#4425

Merged
wpaulino merged 3 commits intolightningdevkit:mainfrom
elnosh:remove-macro
Feb 19, 2026
Merged

Remove test util macros#4425
wpaulino merged 3 commits intolightningdevkit:mainfrom
elnosh:remove-macro

Conversation

@elnosh
Copy link
Contributor

@elnosh elnosh commented Feb 18, 2026

Removed some macros that could be replaced 1:1 with function calls by the same name.

  • check_closed_broadcast
  • get_payment_preimage_hash
  • get_closing_signed_broadcast

Did this while trying out claude

@ldk-reviews-bot
Copy link

ldk-reviews-bot commented Feb 18, 2026

I've assigned @wpaulino 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.

@codecov
Copy link

codecov bot commented Feb 19, 2026

Codecov Report

❌ Patch coverage is 96.15385% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 85.90%. Comparing base (1b8617c) to head (28388c4).
⚠️ Report is 24 commits behind head on main.

Files with missing lines Patch % Lines
lightning/src/ln/functional_test_utils.rs 95.23% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4425   +/-   ##
=======================================
  Coverage   85.90%   85.90%           
=======================================
  Files         156      156           
  Lines      103990   103983    -7     
  Branches   103990   103983    -7     
=======================================
- Hits        89333    89327    -6     
  Misses      12135    12135           
+ Partials     2522     2521    -1     
Flag Coverage Δ
tests 85.90% <96.15%> (+<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.

let reason = ClosureReason::HolderForceClosed { broadcasted_latest_txn: Some(true), message };
check_closed_event(&nodes[0], 1, reason, &[node_b_id], 100000);
check_closed_broadcast!(nodes[0], true);
check_closed_broadcast(&nodes[0], 1, true).pop();
Copy link
Contributor

Choose a reason for hiding this comment

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

Usually we don't call pop since we rely on the length assertion

@ldk-reviews-bot
Copy link

👋 The first review has been submitted!

Do you think this PR is ready for a second reviewer? If so, click here to assign a second reviewer.

elnosh and others added 3 commits February 19, 2026 08:52
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@wpaulino wpaulino merged commit 2203e2d into lightningdevkit:main Feb 19, 2026
20 of 21 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.

3 participants

Comments