diff --git a/Dockerfile b/Dockerfile index b94310c..f45b5dd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -53,7 +53,8 @@ RUN cp /home/user/build/config.toml .cargo/ WORKDIR /home/user/build RUN git clone https://git-crysp.uwaterloo.ca/vvecna/troll-patrol.git WORKDIR /home/user/build/troll-patrol -RUN git checkout dc7531689c2a5ec5b4c757f95a87f576c4d4020c +# Commit on analysis branch +RUN git checkout 264e3824d68d3c548de302e4cc576faa3d99f8da RUN mkdir -p .cargo RUN cp /home/user/build/config.toml .cargo/ diff --git a/src/censor.rs b/src/censor.rs index f7c879f..a6c64aa 100644 --- a/src/censor.rs +++ b/src/censor.rs @@ -169,10 +169,18 @@ impl Censor { if self.has_lox_cred(fingerprint) { let (_cred, cred_count) = &self.lox_credentials.get(&bridge.fingerprint).unwrap(); + + // Reduce the number of these for efficiency. It + // does not benefit the censor to submit more + // than 25 positive reports under the current + // detection algorithm. In practice, the censor + // should submit as many reports as possible. let num_prs = if config.one_positive_report_per_cred { - *cred_count + // *cred_count + min(*cred_count, 25) } else { - 30000 + //30000 + 25 }; for _ in 0..num_prs { self.send_positive_report(config, &bridge.fingerprint).await;