mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-14 12:43:40 +02:00
CT/CA: Enforce validity of confidential commitments via CConfidentialCommitment::IsValid()
This commit is contained in:
parent
58c21ae15c
commit
88a31dff93
1 changed files with 1 additions and 3 deletions
|
|
@ -722,9 +722,7 @@ bool VerifyAmounts(const CCoinsViewCache& cache, const CTransaction& tx, std::ve
|
|||
{
|
||||
const CConfidentialValue& val = tx.vout[i].nValue;
|
||||
const CConfidentialAsset& asset = tx.vout[i].nAsset;
|
||||
assert(val.vchCommitment.size() == CConfidentialValue::nCommittedSize ||
|
||||
val.vchCommitment.size() == CConfidentialValue::nExplicitSize);
|
||||
if (!tx.vout[i].nNonce.IsValid())
|
||||
if (!asset.IsValid() || !val.IsValid() || !tx.vout[i].nNonce.IsValid())
|
||||
return false;
|
||||
if (tx.vout[i].vchRangeproof.size() > 5000)
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue