mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-17 20:02:43 +00:00
Test the pruning of excess peers using randomly generated input (#3248)
## Issue Addressed https://github.com/sigp/lighthouse/issues/3092 ## Proposed Changes Added property-based tests for the pruning implementation. A randomly generated input for the test contains connection direction, subnets, and scores. ## Additional Info I left some comments on this PR, what I have tried, and [a question](https://github.com/sigp/lighthouse/pull/3248#discussion_r891981969). Co-authored-by: Diva M <divma@protonmail.com>
This commit is contained in:
@@ -223,6 +223,7 @@ impl RealScore {
|
||||
#[cfg(test)]
|
||||
pub fn set_gossipsub_score(&mut self, score: f64) {
|
||||
self.gossipsub_score = score;
|
||||
self.update_state();
|
||||
}
|
||||
|
||||
/// Applies time-based logic such as decay rates to the score.
|
||||
|
||||
Reference in New Issue
Block a user