소스 검색

Move things around for aesthetic reasons

Vecna 5 달 전
부모
커밋
7573c70dda
2개의 변경된 파일16개의 추가작업 그리고 16개의 파일을 삭제
  1. 8 8
      src/negative_report.rs
  2. 8 8
      src/positive_report.rs

+ 8 - 8
src/negative_report.rs

@@ -27,20 +27,20 @@ pub struct NegativeReport {
     /// hashed fingerprint (SHA-1 hash of 20-byte bridge ID)
     pub fingerprint: [u8; 20],
 
-    /// some way to prove knowledge of bridge
-    bridge_pok: ProofOfBridgeKnowledge,
-
     /// user's country code
     pub country: String,
 
     /// today's Julian date
     pub date: u32,
 
-    /// a random nonce used in the bridge_pok
-    pub nonce: [u8; 32],
-
     /// the bridge distributor, e.g., Lox, Https, or Moat
     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 {
@@ -179,11 +179,11 @@ impl NegativeReport {
 #[derive(Eq, PartialEq, Ord, PartialOrd, Serialize, Deserialize)]
 pub struct SerializableNegativeReport {
     pub fingerprint: [u8; 20],
-    bridge_pok: ProofOfBridgeKnowledge,
     pub country: String,
     pub date: u32,
-    pub nonce: [u8; 32],
     pub distributor: BridgeDistributor,
+    bridge_pok: ProofOfBridgeKnowledge,
+    pub nonce: [u8; 32],
 }
 
 impl SerializableNegativeReport {

+ 8 - 8
src/positive_report.rs

@@ -31,17 +31,17 @@ pub struct PositiveReport {
     /// hashed fingerprint (SHA-1 hash of 20-byte bridge ID)
     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
     pub country: String,
 
     /// today's Julian date
     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 {
@@ -164,10 +164,10 @@ impl PositiveReport {
 #[derive(Deserialize, Serialize)]
 pub struct SerializablePositiveReport {
     pub fingerprint: [u8; 20],
-    bridge_token: Option<SerializableBridgeToken>,
-    lox_proof: lox_pr::Request,
     pub country: String,
     pub date: u32,
+    bridge_token: Option<SerializableBridgeToken>,
+    lox_proof: lox_pr::Request,
 }
 
 impl SerializablePositiveReport {