mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-20 13:37:28 +02:00
CA: Move CTxOutAsset::vchSurjectionproof into CTxOut
This commit is contained in:
parent
690a403a6d
commit
2103355a30
4 changed files with 17 additions and 18 deletions
|
|
@ -800,14 +800,14 @@ bool VerifyAmounts(const CCoinsViewCache& cache, const CTransaction& tx, std::ve
|
|||
const CTxOutAsset& asset = tx.vout[i].nAsset;
|
||||
//No need for surjective proof
|
||||
if (asset.IsExplicit()) {
|
||||
assert(asset.vchSurjectionproof.size() == 0);
|
||||
assert(tx.vout[i].vchSurjectionproof.size() == 0);
|
||||
continue;
|
||||
}
|
||||
if (secp256k1_generator_parse(secp256k1_ctx_verify_amounts, &gen, &asset.vchCommitment[0]) != 1)
|
||||
return false;
|
||||
|
||||
secp256k1_surjectionproof proof;
|
||||
if (secp256k1_surjectionproof_parse(secp256k1_ctx_verify_amounts, &proof, &asset.vchSurjectionproof[0], asset.vchSurjectionproof.size()) != 1)
|
||||
if (secp256k1_surjectionproof_parse(secp256k1_ctx_verify_amounts, &proof, &tx.vout[i].vchSurjectionproof[0], tx.vout[i].vchSurjectionproof.size()) != 1)
|
||||
return false;
|
||||
|
||||
if (!QueueCheck(pvChecks, new CSurjectionCheck(proof, ephemeral_input_tags, gen, cacheStore))) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue