Procházet zdrojové kódy

change leaf to the coin for merkle tree in burn

narodnik před 4 roky
rodič
revize
b0d3a92c62
1 změnil soubory, kde provedl 2 přidání a 1 odebrání
  1. 2 1
      example/halo2/src/bin/burn.rs

+ 2 - 1
example/halo2/src/bin/burn.rs

@@ -540,7 +540,8 @@ fn main() {
     }
 
     // Merkle root
-    let leaf = pallas::Base::random(&mut OsRng);
+    //let leaf = pallas::Base::random(&mut OsRng);
+    let leaf = coin.clone();
     let pos = rand::random::<u32>();
     let path: Vec<_> = (0..32).map(|_| pallas::Base::random(&mut OsRng)).collect();
     let merkle_root = root(path.clone().try_into().unwrap(), pos, leaf);