Skip to content

Commit 0dab573

Browse files
committed
fix vcl print
1 parent 4642e6e commit 0dab573

File tree

1 file changed

+5
-4
lines changed
  • solution/verifiable_confidential_ledger/src

1 file changed

+5
-4
lines changed

solution/verifiable_confidential_ledger/src/main.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ use colored::*;
66
use std;
77
use wedpr_l_crypto_zkp_utils::point_to_bytes;
88
use wedpr_s_verifiable_confidential_ledger::vcl;
9+
use protobuf::Message;
910

1011
fn main() {
1112
print_highlight2(
@@ -110,13 +111,13 @@ fn flow_cn() {
110111

111112
print_wide(" ▶ 是否存在加和关系?尝试证明c1_value + c2_value =? c3_value");
112113
let sum_proof = vcl::prove_sum_balance(&c1_secret, &c2_secret, &c3_secret);
113-
println!("加和关系的证明数据:\n{:?}", sum_proof);
114+
println!("加和关系的证明数据:\n{:?}", sum_proof.write_to_bytes());
114115
pause_cn();
115116

116117
print_wide(" ▶ 是否存在乘积关系?尝试证明c1_value * c2_value =? c3_value");
117118
let product_proof =
118119
vcl::prove_product_balance(&c1_secret, &c2_secret, &c3_secret);
119-
println!("乘积关系的证明数据:\n{:?}", product_proof);
120+
println!("乘积关系的证明数据:\n{:?}", product_proof.write_to_bytes());
120121
pause_cn();
121122

122123
print_wide(" ▶ 是否是非负数?尝试证明c1_value >=? 0");
@@ -301,7 +302,7 @@ fn flow_en() {
301302
c3_value",
302303
);
303304
let sum_proof = vcl::prove_sum_balance(&c1_secret, &c2_secret, &c3_secret);
304-
println!("Proof data for the sum relationship:\n{:?}", sum_proof);
305+
println!("Proof data for the sum relationship:\n{:?}", sum_proof.write_to_bytes());
305306
pause_en();
306307

307308
print_wide(
@@ -312,7 +313,7 @@ fn flow_en() {
312313
vcl::prove_product_balance(&c1_secret, &c2_secret, &c3_secret);
313314
println!(
314315
"Proof data for the product relationship:\n{:?}",
315-
product_proof
316+
product_proof.write_to_bytes()
316317
);
317318
pause_en();
318319

0 commit comments

Comments
 (0)