Просмотр исходного кода

change asset_id to jubjub::Fr in test cases

ghassmo 4 лет назад
Родитель
Сommit
8998b47494
2 измененных файлов с 3 добавлено и 3 удалено
  1. 1 1
      src/crypto/note.rs
  2. 2 2
      src/wallet/walletdb.rs

+ 1 - 1
src/crypto/note.rs

@@ -127,7 +127,7 @@ fn test_note_encdec() {
     let note = Note {
         serial: jubjub::Fr::random(&mut OsRng),
         value: 110,
-        asset_id: 1,
+        asset_id: jubjub::Fr::random(&mut OsRng),
         coin_blind: jubjub::Fr::random(&mut OsRng),
         valcom_blind: jubjub::Fr::random(&mut OsRng),
     };

+ 2 - 2
src/wallet/walletdb.rs

@@ -377,7 +377,7 @@ mod tests {
         let note = Note {
             serial: jubjub::Fr::random(&mut OsRng),
             value: 110,
-            asset_id: 1,
+            asset_id: jubjub::Fr::random(&mut OsRng),
             coin_blind: jubjub::Fr::random(&mut OsRng),
             valcom_blind: jubjub::Fr::random(&mut OsRng),
         };
@@ -428,7 +428,7 @@ mod tests {
         let note = Note {
             serial: jubjub::Fr::random(&mut OsRng),
             value: 110,
-            asset_id: 1,
+            asset_id: jubjub::Fr::random(&mut OsRng),
             coin_blind: jubjub::Fr::random(&mut OsRng),
             valcom_blind: jubjub::Fr::random(&mut OsRng),
         };