Skip to content

Commit

Permalink
catch false in range proof
Browse files Browse the repository at this point in the history
  • Loading branch information
HaoXuan40404 authored and qyan-dev committed Sep 18, 2020
1 parent 989180f commit 65640ba
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 12 deletions.
13 changes: 2 additions & 11 deletions crypto/src/zkp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,13 +135,7 @@ pub fn verify_value_range_with_blinding_basepoint(
RANGE_SIZE_IN_BITS,
) {
Ok(_) => true,
Err(e) => {
wedpr_println!(
"RangeProof verify_single failed!, result = {:?}",
e
);
return false;
},
Err(_) => false,
}
}

Expand Down Expand Up @@ -225,10 +219,7 @@ pub fn verify_value_range_in_batch(
RANGE_SIZE_IN_BITS,
) {
Ok(_) => true,
Err(_) => {
wedpr_println!("RangeProof verify_multiple failed");
return false;
},
Err(_) => false,
}
}

Expand Down
2 changes: 1 addition & 1 deletion solution/verifiable_confidential_ledger/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ fn wait_for_input() -> String {
std::io::stdin()
.read_line(&mut input)
.expect("Failed to read line.");
input.trim().to_string()
input.trim().to_string()
}

// In this demo, we set the upper limit of input value to 10000.
Expand Down

0 comments on commit 65640ba

Please sign in to comment.