Skip to content

Commit

Permalink
Revert "Fix test failure on Rust v1.81 (#6407)"
Browse files Browse the repository at this point in the history
This reverts commit 8a085fc.
  • Loading branch information
jxs committed Sep 20, 2024
1 parent fc8762c commit bbed0ba
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions beacon_node/lighthouse_network/src/peer_manager/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2345,16 +2345,6 @@ mod tests {
gossipsub_score: f64,
}

// generate an arbitrary f64 while preventing NaN values
fn arbitrary_f64(g: &mut Gen) -> f64 {
loop {
let val = f64::arbitrary(g);
if !val.is_nan() {
return val;
}
}
}

impl Arbitrary for PeerCondition {
fn arbitrary(g: &mut Gen) -> Self {
let attestation_net_bitfield = {
Expand All @@ -2380,9 +2370,9 @@ mod tests {
outgoing: bool::arbitrary(g),
attestation_net_bitfield,
sync_committee_net_bitfield,
score: arbitrary_f64(g),
score: f64::arbitrary(g),
trusted: bool::arbitrary(g),
gossipsub_score: arbitrary_f64(g),
gossipsub_score: f64::arbitrary(g),
}
}
}
Expand Down

0 comments on commit bbed0ba

Please sign in to comment.