Skip to content

Commit

Permalink
bot: Fix calculating testnet participation
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-at-planetariummusic committed Sep 26, 2023
1 parent c786ac0 commit 5089660
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions bot/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1860,17 +1860,19 @@ fn classify(
let insufficent_testnet_participation: Option<String> = testnet_participation
.as_ref()
.and_then(|testnet_participation| {
testnet_participation.get(&identity).and_then(|passed| {
if !passed {
let note = "Insufficient testnet participation".to_string();
if config.enforce_testnet_participation {
return Some(note);
} else {
validator_notes.push(note);
}
let passed = testnet_participation
.get(&identity)
.map_or(false, |found_passed| *found_passed);

if !passed {
let note = "Insufficient testnet participation".to_string();
if config.enforce_testnet_participation {
return Some(note);
} else {
validator_notes.push(note);
}
None
})
}
None
});

let performance_requirements_waived =
Expand Down

0 comments on commit 5089660

Please sign in to comment.