mirror of
https://github.com/mimblewimble/grin.git
synced 2025-01-21 03:21:08 +03:00
Checking rangeproof explanatory comment (#120)
This commit is contained in:
parent
4aea4d0548
commit
6493468959
1 changed files with 2 additions and 0 deletions
|
@ -333,6 +333,8 @@ impl Output {
|
|||
|
||||
/// Validates the range proof using the commitment
|
||||
pub fn verify_proof(&self, secp: &Secp256k1) -> Result<(), secp::Error> {
|
||||
/// secp.verify returns range if and only if both min_value and max_value less than 2^64
|
||||
/// since group order is much larger (~2^256) we can be sure overflow is not the case
|
||||
secp.verify_range_proof(self.commit, self.proof).map(|_| ())
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue