mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-14 12:43:40 +02:00
CA: CTxOutAsset::vchAssetTag -> CTxOutAsset::vchCommitment
This commit is contained in:
parent
37230ccc1b
commit
6d3406185f
7 changed files with 32 additions and 32 deletions
|
|
@ -143,9 +143,9 @@ bool CachingTransactionSignatureChecker::VerifySignature(const std::vector<unsig
|
|||
return true;
|
||||
}
|
||||
|
||||
bool CachingRangeProofChecker::VerifyRangeProof(const std::vector<unsigned char>& vchRangeProof, const std::vector<unsigned char>& vchCommitment, const std::vector<unsigned char>& vchAssetTag, const CScript& scriptPubKey, const secp256k1_context* secp256k1_ctx_verify_amounts) const
|
||||
bool CachingRangeProofChecker::VerifyRangeProof(const std::vector<unsigned char>& vchRangeProof, const std::vector<unsigned char>& vchValueCommitment, const std::vector<unsigned char>& vchAssetCommitment, const CScript& scriptPubKey, const secp256k1_context* secp256k1_ctx_verify_amounts) const
|
||||
{
|
||||
CPubKey pubkey(vchCommitment);
|
||||
CPubKey pubkey(vchValueCommitment);
|
||||
uint256 entry;
|
||||
rangeProofCache.ComputeEntry(entry, uint256(), vchRangeProof, pubkey);
|
||||
|
||||
|
|
@ -155,11 +155,11 @@ bool CachingRangeProofChecker::VerifyRangeProof(const std::vector<unsigned char>
|
|||
|
||||
uint64_t min_value, max_value;
|
||||
secp256k1_pedersen_commitment commit;
|
||||
if (secp256k1_pedersen_commitment_parse(secp256k1_ctx_verify_amounts, &commit, &vchCommitment[0]) != 1)
|
||||
if (secp256k1_pedersen_commitment_parse(secp256k1_ctx_verify_amounts, &commit, &vchValueCommitment[0]) != 1)
|
||||
return false;
|
||||
|
||||
secp256k1_generator tag;
|
||||
if (secp256k1_generator_parse(secp256k1_ctx_verify_amounts, &tag, &vchAssetTag[0]) != 1)
|
||||
if (secp256k1_generator_parse(secp256k1_ctx_verify_amounts, &tag, &vchAssetCommitment[0]) != 1)
|
||||
return false;
|
||||
|
||||
if (!secp256k1_rangeproof_verify(secp256k1_ctx_verify_amounts, &min_value, &max_value, &commit, vchRangeProof.data(), vchRangeProof.size(), scriptPubKey.size() ? &scriptPubKey.front() : NULL, scriptPubKey.size(), &tag)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue