File tree Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -165,7 +165,7 @@ pub enum Event {
165
165
failed_messages : FailedMessages ,
166
166
} ,
167
167
/// A Peer is below the score threshold.
168
- LowScorePeers { peer_ids : Vec < PeerId > } ,
168
+ BelowThresholdPeers { peer_ids : Vec < PeerId > } ,
169
169
}
170
170
171
171
/// A data structure for storing configuration for publishing messages. See [`MessageAuthenticity`]
@@ -2191,7 +2191,7 @@ where
2191
2191
2192
2192
if !peers_to_report. is_empty ( ) {
2193
2193
self . events
2194
- . push_back ( ToSwarm :: GenerateEvent ( Event :: LowScorePeers {
2194
+ . push_back ( ToSwarm :: GenerateEvent ( Event :: BelowThresholdPeers {
2195
2195
peer_ids : peers_to_report,
2196
2196
} ) ) ;
2197
2197
}
Original file line number Diff line number Diff line change @@ -6826,11 +6826,16 @@ fn test_low_score_peer_is_reported() {
6826
6826
let low_score_event = gs
6827
6827
. events
6828
6828
. iter ( )
6829
- . find ( |event| matches ! ( event, ToSwarm :: GenerateEvent ( Event :: LowScorePeers { .. } ) ) )
6829
+ . find ( |event| {
6830
+ matches ! (
6831
+ event,
6832
+ ToSwarm :: GenerateEvent ( Event :: BelowThresholdPeers { .. } )
6833
+ )
6834
+ } )
6830
6835
. unwrap ( ) ;
6831
6836
6832
6837
match low_score_event {
6833
- ToSwarm :: GenerateEvent ( Event :: LowScorePeers { peer_ids } ) => {
6838
+ ToSwarm :: GenerateEvent ( Event :: BelowThresholdPeers { peer_ids } ) => {
6834
6839
assert_eq ! ( peer_ids. len( ) , 2 ) ;
6835
6840
assert ! ( peer_ids. contains( & peers[ 0 ] ) ) ;
6836
6841
assert ! ( peer_ids. contains( & peers[ 1 ] ) ) ;
You can’t perform that action at this time.
0 commit comments