CT: Switch to standard CConfidentialValue::IsCommitment() API instead checking the size of the commitment vector directly

This commit is contained in:
Mark Friedenbach 2017-03-10 10:11:52 -08:00 committed by Gregory Sanders
parent d081aeda5e
commit 71d52fa0b6

View file

@ -1280,7 +1280,7 @@ bool VerifyAmounts(const CCoinsViewCache& cache, const CTransaction& tx, std::ve
return false;
}
else {
assert(val.vchCommitment.size() == CConfidentialValue::nCommittedSize);
assert(val.IsCommitment());
if (secp256k1_pedersen_commitment_parse(secp256k1_ctx_verify_amounts, &commit, &val.vchCommitment[0]) != 1)
return false;
}