-
Notifications
You must be signed in to change notification settings - Fork 412
rustfmt
: Reformat the fuzz
dir – the easy part
#3111
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
rustfmt
: Reformat the fuzz
dir – the easy part
#3111
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## main #3111 +/- ##
==========================================
+ Coverage 89.84% 89.85% +0.01%
==========================================
Files 119 119
Lines 97843 97843
Branches 97843 97843
==========================================
+ Hits 87906 87921 +15
+ Misses 7368 7352 -16
- Partials 2569 2570 +1 ☔ View full report in Codecov by Sentry. |
Fixed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Otherwise LGTM.
f891099
to
a8622c9
Compare
Force pushed with the following changes: > git diff-tree -U2 b5dd23920 a8622c98b
diff --git a/fuzz/src/router.rs b/fuzz/src/router.rs
index f62461df4..a40026821 100644
--- a/fuzz/src/router.rs
+++ b/fuzz/src/router.rs
@@ -208,12 +208,7 @@ pub fn do_test<Out: test_logger::Output>(data: &[u8], out: Out) {
for _ in 0..count {
scid += 1;
- let (rnid, _) = node_pks
- .iter()
- .skip(
- u16::from_be_bytes(get_slice!(2).try_into().unwrap()) as usize
- % node_pks.len(),
- )
- .next()
- .unwrap();
+ let skip = u16::from_be_bytes(get_slice!(2).try_into().unwrap()) as usize
+ % node_pks.len();
+ let (rnid, _) = node_pks.iter().skip(skip).next().unwrap();
let capacity = u64::from_be_bytes(get_slice!(8).try_into().unwrap());
$first_hops_vec.push(ChannelDetails {
@@ -272,9 +267,6 @@ pub fn do_test<Out: test_logger::Output>(data: &[u8], out: Out) {
for _ in 0..count {
scid += 1;
- let (rnid, _) = node_pks
- .iter()
- .skip(slice_to_be16(get_slice!(2)) as usize % node_pks.len())
- .next()
- .unwrap();
+ let skip = slice_to_be16(get_slice!(2)) as usize % node_pks.len();
+ let (rnid, _) = node_pks.iter().skip(skip).next().unwrap();
$last_hops.push(RouteHint(vec![RouteHintHop {
src_node_id: *rnid, |
#3080 should go first, i think. |
Fine by me, although IIUC there should barely be any conflicts as this doesn't interfere with the |
a8622c9
to
b4a906d
Compare
b4a906d
to
99409fb
Compare
Rebased to resolve minor conflicts after #3080 landed. |
As suggested here, we split out the easy part from #3102 to have it land fast and reduce the risk of potential rebases becoming necessary.