Move things around for aesthetic reasons
This commit is contained in:
parent
eda8e5c9f0
commit
7573c70dda
|
@ -27,20 +27,20 @@ pub struct NegativeReport {
|
||||||
/// hashed fingerprint (SHA-1 hash of 20-byte bridge ID)
|
/// hashed fingerprint (SHA-1 hash of 20-byte bridge ID)
|
||||||
pub fingerprint: [u8; 20],
|
pub fingerprint: [u8; 20],
|
||||||
|
|
||||||
/// some way to prove knowledge of bridge
|
|
||||||
bridge_pok: ProofOfBridgeKnowledge,
|
|
||||||
|
|
||||||
/// user's country code
|
/// user's country code
|
||||||
pub country: String,
|
pub country: String,
|
||||||
|
|
||||||
/// today's Julian date
|
/// today's Julian date
|
||||||
pub date: u32,
|
pub date: u32,
|
||||||
|
|
||||||
/// a random nonce used in the bridge_pok
|
|
||||||
pub nonce: [u8; 32],
|
|
||||||
|
|
||||||
/// the bridge distributor, e.g., Lox, Https, or Moat
|
/// the bridge distributor, e.g., Lox, Https, or Moat
|
||||||
pub distributor: BridgeDistributor,
|
pub distributor: BridgeDistributor,
|
||||||
|
|
||||||
|
/// some way to prove knowledge of bridge
|
||||||
|
bridge_pok: ProofOfBridgeKnowledge,
|
||||||
|
|
||||||
|
/// a random nonce used in the bridge_pok
|
||||||
|
pub nonce: [u8; 32],
|
||||||
}
|
}
|
||||||
|
|
||||||
impl NegativeReport {
|
impl NegativeReport {
|
||||||
|
@ -179,11 +179,11 @@ impl NegativeReport {
|
||||||
#[derive(Eq, PartialEq, Ord, PartialOrd, Serialize, Deserialize)]
|
#[derive(Eq, PartialEq, Ord, PartialOrd, Serialize, Deserialize)]
|
||||||
pub struct SerializableNegativeReport {
|
pub struct SerializableNegativeReport {
|
||||||
pub fingerprint: [u8; 20],
|
pub fingerprint: [u8; 20],
|
||||||
bridge_pok: ProofOfBridgeKnowledge,
|
|
||||||
pub country: String,
|
pub country: String,
|
||||||
pub date: u32,
|
pub date: u32,
|
||||||
pub nonce: [u8; 32],
|
|
||||||
pub distributor: BridgeDistributor,
|
pub distributor: BridgeDistributor,
|
||||||
|
bridge_pok: ProofOfBridgeKnowledge,
|
||||||
|
pub nonce: [u8; 32],
|
||||||
}
|
}
|
||||||
|
|
||||||
impl SerializableNegativeReport {
|
impl SerializableNegativeReport {
|
||||||
|
|
|
@ -31,17 +31,17 @@ pub struct PositiveReport {
|
||||||
/// hashed fingerprint (SHA-1 hash of 20-byte bridge ID)
|
/// hashed fingerprint (SHA-1 hash of 20-byte bridge ID)
|
||||||
pub fingerprint: [u8; 20],
|
pub fingerprint: [u8; 20],
|
||||||
|
|
||||||
/// token from the bridge indicating it was reached
|
|
||||||
bridge_token: Option<BridgeToken>,
|
|
||||||
|
|
||||||
// proof of Lox cred with level >= 3 and this bridge
|
|
||||||
lox_proof: lox_pr::Request,
|
|
||||||
|
|
||||||
/// user's country code, may be an empty string
|
/// user's country code, may be an empty string
|
||||||
pub country: String,
|
pub country: String,
|
||||||
|
|
||||||
/// today's Julian date
|
/// today's Julian date
|
||||||
pub date: u32,
|
pub date: u32,
|
||||||
|
|
||||||
|
/// token from the bridge indicating it was reached
|
||||||
|
bridge_token: Option<BridgeToken>,
|
||||||
|
|
||||||
|
// proof of Lox cred with level >= 3 and this bridge
|
||||||
|
lox_proof: lox_pr::Request,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl PositiveReport {
|
impl PositiveReport {
|
||||||
|
@ -164,10 +164,10 @@ impl PositiveReport {
|
||||||
#[derive(Deserialize, Serialize)]
|
#[derive(Deserialize, Serialize)]
|
||||||
pub struct SerializablePositiveReport {
|
pub struct SerializablePositiveReport {
|
||||||
pub fingerprint: [u8; 20],
|
pub fingerprint: [u8; 20],
|
||||||
bridge_token: Option<SerializableBridgeToken>,
|
|
||||||
lox_proof: lox_pr::Request,
|
|
||||||
pub country: String,
|
pub country: String,
|
||||||
pub date: u32,
|
pub date: u32,
|
||||||
|
bridge_token: Option<SerializableBridgeToken>,
|
||||||
|
lox_proof: lox_pr::Request,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl SerializablePositiveReport {
|
impl SerializablePositiveReport {
|
||||||
|
|
Loading…
Reference in New Issue