From bbed0ba6688333bd81b9d2e4852f167fc01fb477 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Oliveira?= Date: Fri, 20 Sep 2024 14:36:10 +0100 Subject: [PATCH] Revert "Fix test failure on Rust v1.81 (#6407)" This reverts commit 8a085fc828cef14674ef342906b715dd816e8047. --- .../lighthouse_network/src/peer_manager/mod.rs | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/beacon_node/lighthouse_network/src/peer_manager/mod.rs b/beacon_node/lighthouse_network/src/peer_manager/mod.rs index 320bbc4d638..4d913312354 100644 --- a/beacon_node/lighthouse_network/src/peer_manager/mod.rs +++ b/beacon_node/lighthouse_network/src/peer_manager/mod.rs @@ -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 = { @@ -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), } } }