Explorar o código

removed conflicts

rachel-rose %!s(int64=5) %!d(string=hai) anos
pai
achega
4d74555ebe
Modificáronse 1 ficheiros con 7 adicións e 4 borrados
  1. 7 4
      src/bin/tx-test.rs

+ 7 - 4
src/bin/tx-test.rs

@@ -44,12 +44,13 @@ struct MemoryState {
     spend_pvk: groth16::PreparedVerifyingKey<Bls12>,
 
     // Public key of the cashier
-    cashier_public: jubjub::SubgroupPoint,
+    cashier_public: Vec<u8>,
     // List of all our secret keys
     secrets: Vec<jubjub::Fr>,
 }
 
 impl ProgramState for MemoryState {
+    // Vec<u8> for keys
     fn is_valid_cashier_public_key(&self, public: &jubjub::SubgroupPoint) -> bool {
         public == &self.cashier_public
     }
@@ -163,9 +164,11 @@ fn main() {
 
     // Where is cashier private key stored? Does node have its own wallet schema
     // Cashier creates a secret key
-    let cashier_secret = jubjub::Fr::random(&mut OsRng);
-    // This is their public key
-    let cashier_public = zcash_primitives::constants::SPENDING_KEY_GENERATOR * cashier_secret;
+    //let cashier_secret = jubjub::Fr::random(&mut OsRng);
+    //// This is their public key
+    //let cashier_public = zcash_primitives::constants::SPENDING_KEY_GENERATOR * cashier_secret;
+
+    let cashier_secret = state.cashier_key();
 
     // Wallet 1 creates a secret key
     let secret = jubjub::Fr::random(&mut OsRng);