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

change leaf to the coin for merkle tree in burn

narodnik 4 лет назад
Родитель
Сommit
b0d3a92c62
1 измененных файлов с 2 добавлено и 1 удалено
  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);