26 lines
826 B
Rust
26 lines
826 B
Rust
|
use crate::simulation::censor;
|
||
|
|
||
|
use lox_cli::networking::*;
|
||
|
use lox_library::IssuerPubKey;
|
||
|
|
||
|
pub struct Config {
|
||
|
pub la_pubkeys: Vec<IssuerPubKey>,
|
||
|
pub la_net: HyperNet,
|
||
|
pub tp_net: HyperNet,
|
||
|
// Define censor behavior
|
||
|
pub censor_hides: censor::Hides,
|
||
|
pub censor_speed: censor::Speed,
|
||
|
pub censor_event_duration: u32,
|
||
|
pub censor_totality: censor::Totality,
|
||
|
pub censor_partial_blocking_percent: f64,
|
||
|
// We model only one country at a time because Lox assumes censors
|
||
|
// share information with each other.
|
||
|
pub country: String,
|
||
|
// Probability that a connection randomly fails, even though censor
|
||
|
// does not block the bridge
|
||
|
pub prob_connection_fails: f64,
|
||
|
pub prob_user_invites_friend: f64,
|
||
|
pub prob_user_is_censor: f64,
|
||
|
pub prob_user_submits_reports: f64,
|
||
|
}
|