Add date to proof of bridge knowledge in negative reports
This commit is contained in:
parent
eb1b4939be
commit
13bf94ec17
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue