Skip to content

rustfmt: Reformat the fuzz dir #3102

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

Merged
merged 5 commits into from
Jun 13, 2024

Conversation

tnull
Copy link
Contributor

@tnull tnull commented Jun 6, 2024

We run rustfmt on the fuzz dir and make sure that any auto-generated targets are formatted, too.

@tnull tnull marked this pull request as draft June 6, 2024 11:20
@codecov-commenter
Copy link

codecov-commenter commented Jun 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.82%. Comparing base (5e3056e) to head (4e9ce52).
Report is 2 commits behind head on main.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3102      +/-   ##
==========================================
+ Coverage   89.80%   89.82%   +0.02%     
==========================================
  Files         119      119              
  Lines       98070    98070              
  Branches    98070    98070              
==========================================
+ Hits        88068    88094      +26     
+ Misses       7421     7399      -22     
+ Partials     2581     2577       -4     

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

@tnull tnull force-pushed the 2024-06-rustfmt-fuzz branch 6 times, most recently from f329436 to ad91338 Compare June 6, 2024 12:52
@tnull tnull marked this pull request as ready for review June 6, 2024 13:36
@tnull
Copy link
Contributor Author

tnull commented Jun 6, 2024

Should be good for initial reviews.

@tnull tnull requested review from jkczyz and TheBlueMatt and removed request for jkczyz June 6, 2024 13:37
@tnull tnull force-pushed the 2024-06-rustfmt-fuzz branch 7 times, most recently from 8967fc6 to 6b40382 Compare June 7, 2024 09:45
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.

Do you want to go ahead and land all the "simple" stuff (ie everything but full_stack and chanmon_consistency) here and do the rest in a separate PR?

@tnull
Copy link
Contributor Author

tnull commented Jun 7, 2024

Do you want to go ahead and land all the "simple" stuff (ie everything but full_stack and chanmon_consistency) here and do the rest in a separate PR?

Now split them out to #3111 and rebased this on top.

@tnull tnull force-pushed the 2024-06-rustfmt-fuzz branch 4 times, most recently from 90962df to f0a01dd Compare June 10, 2024 08:49
@valentinewallace valentinewallace self-requested a review June 10, 2024 17:43
@TheBlueMatt
Copy link
Collaborator

Ugh, I forgot I also had #3113 lying around locally that was waiting on a now-merged PR...

@tnull
Copy link
Contributor Author

tnull commented Jun 11, 2024

Ugh, I forgot I also had #3113 lying around locally that was waiting on a now-merged PR...

Alright, would you prefer that we put this PR on hold until #3113 is merged? I'll mark this as blocked on dependent PR for now and will review #3113 ASAP to keep making progress.

@TheBlueMatt
Copy link
Collaborator

If that's alright. Its more annoying to rebase that than rustfmt...

@tnull
Copy link
Contributor Author

tnull commented Jun 12, 2024

If that's alright. Its more annoying to rebase that than rustfmt...

SGTM

@tnull tnull force-pushed the 2024-06-rustfmt-fuzz branch from 0466ef0 to b0fc556 Compare June 12, 2024 17:29
@tnull
Copy link
Contributor Author

tnull commented Jun 12, 2024

Rebased and addressed comments after #3113 landed.

@tnull tnull force-pushed the 2024-06-rustfmt-fuzz branch 2 times, most recently from b7e1662 to 3aff728 Compare June 12, 2024 17:53
@tnull tnull force-pushed the 2024-06-rustfmt-fuzz branch 2 times, most recently from e8d5b76 to 27216d0 Compare June 12, 2024 19:50
@tnull
Copy link
Contributor Author

tnull commented Jun 12, 2024

Force-pushed with this fixup:

> git diff-tree -U2  027e9a576 4e9ce52c7
diff --git a/fuzz/src/chanmon_consistency.rs b/fuzz/src/chanmon_consistency.rs
index 66ff157e7..c4d179e74 100644
--- a/fuzz/src/chanmon_consistency.rs
+++ b/fuzz/src/chanmon_consistency.rs
@@ -589,5 +589,14 @@ fn send_hop_noret(
        amt: u64, payment_id: &mut u8, payment_idx: &mut u64,
 ) {
-       send_payment(source, dest, dest_chan_id, amt, payment_id, payment_idx);
+       send_hop_payment(
+               source,
+               middle,
+               middle_chan_id,
+               dest,
+               dest_chan_id,
+               amt,
+               payment_id,
+               payment_idx,
+       );
 }

@tnull tnull force-pushed the 2024-06-rustfmt-fuzz branch from 27216d0 to 4e9ce52 Compare June 12, 2024 19:53
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.

Diff from @valentinewallace's ACK is small and its all fuzz code anyway, so not bothering to wait for her to look again.

@TheBlueMatt TheBlueMatt merged commit 07f3380 into lightningdevkit:main Jun 13, 2024
13 of 16 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