From a8a1a933dc211c2efb3c254ccf7c4d4115287b50 Mon Sep 17 00:00:00 2001 From: Steven Roose Date: Thu, 18 Feb 2021 11:12:59 +0000 Subject: [PATCH] Make it clear that the CRangeCheck is not called on explicit values That is enforced by the `VerifyAmounts` method for regular transactions and by the `VerifyIssuanceAmounts` method for issuance values. --- src/confidential_validation.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/confidential_validation.cpp b/src/confidential_validation.cpp index 2a7f7bb51e..efc7b753c4 100644 --- a/src/confidential_validation.cpp +++ b/src/confidential_validation.cpp @@ -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;