Skip to content
Snippets Groups Projects
Commit 13bf94ec authored by Vecna's avatar Vecna
Browse files

Add date to proof of bridge knowledge in negative reports

parent eb1b4939
No related branches found
No related tags found
No related merge requests found
Pipeline #157266 failed
......@@ -371,6 +371,8 @@ mod tests {
let num_report_3 = rng.next_u32() % 4 + 1;
let mut reports = BTreeMap::<String, u32>::new();
let date = th.context.ba.lock().unwrap().today();
let report_1 =
NegativeReport::from_bridgeline(bridges[0], "ru".to_string(), BridgeDistributor::Lox);
reports.insert(report_1.to_json(), num_report_1);
......@@ -424,8 +426,12 @@ mod tests {
// Incorrect BridgeLine hash
let invalid_report_4 = NegativeReport::new(
bridges[0].fingerprint,
ProofOfBridgeKnowledge::HashOfBridgeLine(HashOfBridgeLine::new(&BridgeLine::default())),
ProofOfBridgeKnowledge::HashOfBridgeLine(HashOfBridgeLine::new(
&BridgeLine::default(),
date,
)),
"ru".to_string(),
date,
BridgeDistributor::Lox,
);
reports.insert(invalid_report_4.to_json(), num_invalid_report_4);
......@@ -433,8 +439,9 @@ mod tests {
// Incorrect bucket hash
let invalid_report_5 = NegativeReport::new(
bridges[1].fingerprint,
ProofOfBridgeKnowledge::HashOfBucket(HashOfBucket::new(&Scalar::ZERO)),
ProofOfBridgeKnowledge::HashOfBucket(HashOfBucket::new(&Scalar::ZERO, date)),
"ru".to_string(),
date,
BridgeDistributor::Lox,
);
reports.insert(invalid_report_5.to_json(), num_invalid_report_5);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment