If positive reports change anything, print a notice
This commit is contained in:
parent
264e3824d6
commit
7acba0a6f0
|
@ -8,6 +8,9 @@ use std::{
|
|||
collections::{BTreeMap, HashSet},
|
||||
};
|
||||
|
||||
#[cfg(feature = "simulation")]
|
||||
use crate::get_date;
|
||||
|
||||
/// Provides a function for predicting which countries block this bridge
|
||||
pub trait Analyzer {
|
||||
/// Evaluate open-entry bridge. Returns true if blocked, false otherwise.
|
||||
|
@ -159,6 +162,23 @@ pub fn blocked_in(
|
|||
positive_reports_today,
|
||||
) {
|
||||
blocked_in.insert(country.to_string());
|
||||
} else {
|
||||
// Logging in simulation mode
|
||||
#[cfg(feature = "simulation")]
|
||||
if analyzer.stage_two(
|
||||
age,
|
||||
confidence,
|
||||
&bridge_ips,
|
||||
bridge_ips_today,
|
||||
&negative_reports,
|
||||
negative_reports_today,
|
||||
) {
|
||||
println!(
|
||||
"{} detected not blocked due to positive reports on day {}",
|
||||
array_bytes::bytes2hex("", bridge_info.fingerprint),
|
||||
get_date()
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue