modify update_sapling_tree utility to output JSON
This commit is contained in:
parent
148563b7e6
commit
2c4a48b772
|
@ -26,10 +26,11 @@ const BATCH_SIZE: u64 = 10_000;
|
|||
fn print_sapling_tree(height: u64, time: u32, tree: CommitmentTree) {
|
||||
let mut tree_bytes = vec![];
|
||||
tree.write(&mut tree_bytes).unwrap();
|
||||
println!("Updated Sapling tree:");
|
||||
println!("- Height: {}", height);
|
||||
println!("- Time: {}", time);
|
||||
println!("- Tree: {}", hex::encode(tree_bytes));
|
||||
println!("{");
|
||||
println!(" \"height\": {},", height);
|
||||
println!(" \"time\": {},", time);
|
||||
println!(" \"tree\": \"{}\",", hex::encode(tree_bytes));
|
||||
println!("}");
|
||||
}
|
||||
|
||||
fn main() {
|
||||
|
|
Loading…
Reference in New Issue