Merge #959: Make it clear that the CRangeCheck is not called on explicit values

a8a1a933d Make it clear that the CRangeCheck is not called on explicit values (Steven Roose)

Pull request description:

  That is enforced by the `VerifyAmounts` method for regular transactions
  and by the `VerifyIssuanceAmounts` method for issuance values.

Tree-SHA512: 69064ca21dbe3a574f38ba8ea9a13cc2d4b6d0ac2b306fad59ff6fa92e63e08c8f4607da82c31731dcf91044eb47c8d79ced2ff49c7c0843343f438eb8bac943
This commit is contained in:
Steven Roose 2021-03-02 16:26:46 +00:00
commit 8c834f7da1
No known key found for this signature in database
GPG key ID: 2F2A88D7F8D68E87

View file

@ -52,9 +52,7 @@ CAmountMap GetFeeMap(const CTransaction& tx) {
}
bool CRangeCheck::operator()() {
if (val->IsExplicit()) {
return true;
}
assert(val->IsCommitment());
if (!CachingRangeProofChecker(store).VerifyRangeProof(rangeproof, val->vchCommitment, assetCommitment, scriptPubKey, secp256k1_ctx_verify_amounts)) {
error = SCRIPT_ERR_RANGEPROOF;