Rangeproof validation and rewinding should fail gracefully

This commit is contained in:
Gregory Sanders 2017-03-31 10:58:03 -04:00
parent 5157fc17ba
commit 9d04bf58ba
2 changed files with 5 additions and 1 deletions

View file

@ -153,6 +153,10 @@ bool CachingRangeProofChecker::VerifyRangeProof(const std::vector<unsigned char>
return true;
}
if (vchRangeProof.size() == 0) {
return false;
}
uint64_t min_value, max_value;
secp256k1_pedersen_commitment commit;
if (secp256k1_pedersen_commitment_parse(secp256k1_ctx_verify_amounts, &commit, &vchValueCommitment[0]) != 1)