Skip to content

Commit

Permalink
fix(gossipsub): allow clippy beta lint (#3321)
Browse files Browse the repository at this point in the history
It doesn't appear that rust-lang/rust-clippy#10061 is going to be fixed any time soon. In the meantime, our CI is "red" which is misleading because we purposely don't require this CI check. It will however hit stable in ~ 2 weeks at which point our required clippy CI check will fail.

Suppress clippy lint with an `allow` to make it pass.
  • Loading branch information
thomaseizinger authored Jan 13, 2023
1 parent 91ebe7b commit e3c7023
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions protocols/gossipsub/src/behaviour.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1416,6 +1416,8 @@ where
peer_score.add_penalty(peer_id, 1);

// check the flood cutoff
// See: https://github.com/rust-lang/rust-clippy/issues/10061
#[allow(unknown_lints, clippy::unchecked_duration_subtraction)]
let flood_cutoff = (backoff_time
+ self.config.graft_flood_threshold())
- self.config.prune_backoff();
Expand Down

0 comments on commit e3c7023

Please sign in to comment.