|
@@ -2,6 +2,9 @@ use curve25519_dalek::Scalar;
|
|
|
use ed25519_dalek::VerifyingKey;
|
|
|
use lox_library::bridge_table::BridgeLine;
|
|
|
use serde::{Deserialize, Serialize};
|
|
|
+use std::collections::HashSet;
|
|
|
+
|
|
|
+// TODO: Rename this. We already have a different BridgeInfo in lib.rs.
|
|
|
|
|
|
/// Information that needs to be known to verify a Troll Patrol report
|
|
|
#[derive(Debug, Serialize, Deserialize)]
|
|
@@ -9,8 +12,8 @@ pub struct BridgeInfo {
|
|
|
/// BridgeLine for this bridge
|
|
|
pub bridge_line: BridgeLine,
|
|
|
|
|
|
- /// Bucket for this bridge if this bridge is a Lox bridge
|
|
|
- pub bucket: Option<Scalar>,
|
|
|
+ /// Buckets containing this bridge if this bridge is a Lox bridge
|
|
|
+ pub buckets: HashSet<Scalar>,
|
|
|
|
|
|
/// Key used to verify bridge tokens
|
|
|
pub pubkey: Option<VerifyingKey>,
|
|
@@ -20,7 +23,7 @@ impl BridgeInfo {
|
|
|
pub fn new(bl: BridgeLine) -> Self {
|
|
|
BridgeInfo {
|
|
|
bridge_line: bl,
|
|
|
- bucket: None,
|
|
|
+ buckets: HashSet::<Scalar>::new(),
|
|
|
pubkey: None,
|
|
|
}
|
|
|
}
|