mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-16 13:01:19 +02:00
CT: Turn CTxOut::vchNonceCommitment into a CConfidentialCommitment subclass
Note: This changes the serialization of the nonce commitment, from an arbitrary length vector to an either 1 (null) or 33 (commitment) byte fixed format.
This commit is contained in:
parent
a2c0f11f8e
commit
58c21ae15c
6 changed files with 31 additions and 19 deletions
|
|
@ -724,7 +724,9 @@ bool VerifyAmounts(const CCoinsViewCache& cache, const CTransaction& tx, std::ve
|
|||
const CConfidentialAsset& asset = tx.vout[i].nAsset;
|
||||
assert(val.vchCommitment.size() == CConfidentialValue::nCommittedSize ||
|
||||
val.vchCommitment.size() == CConfidentialValue::nExplicitSize);
|
||||
if (tx.vout[i].vchNonceCommitment.size() > 33 || tx.vout[i].vchRangeproof.size() > 5000)
|
||||
if (!tx.vout[i].nNonce.IsValid())
|
||||
return false;
|
||||
if (tx.vout[i].vchRangeproof.size() > 5000)
|
||||
return false;
|
||||
|
||||
if (asset.IsExplicit()) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue