lightningdevkit / rust-lightning

A highly modular Bitcoin Lightning library written in Rust. It's rust-lightning, not Rusty's Lightning!
Other
1.11k stars 342 forks source link

`rustfmt`: Reformat the `fuzz` dir #3102

Closed tnull closed 2 weeks ago

tnull commented 3 weeks ago

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

codecov-commenter commented 3 weeks ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

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

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

Additional details and impacted files ```diff @@ 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 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

tnull commented 3 weeks ago

Should be good for initial reviews.

tnull commented 3 weeks ago

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 https://github.com/lightningdevkit/rust-lightning/pull/3111 and rebased this on top.

tnull commented 3 weeks ago

Rebased after #3111 landed and addressed open comments.

TheBlueMatt commented 3 weeks ago

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

tnull commented 3 weeks ago

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 commented 3 weeks ago

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

tnull commented 3 weeks ago

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

SGTM

tnull commented 2 weeks ago

Rebased and addressed comments after #3113 landed.

tnull commented 2 weeks ago

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,
+       );
 }