mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-14 12:43:40 +02:00
Rangeproof commits to scriptpubkey
This commit is contained in:
parent
74cb1f5cab
commit
714e8fc0d0
4 changed files with 9 additions and 8 deletions
|
|
@ -143,7 +143,7 @@ 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 secp256k1_context* secp256k1_ctx_verify_amounts) const
|
||||
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
|
||||
{
|
||||
CPubKey pubkey(vchCommitment);
|
||||
uint256 entry;
|
||||
|
|
@ -162,7 +162,7 @@ bool CachingRangeProofChecker::VerifyRangeProof(const std::vector<unsigned char>
|
|||
if (secp256k1_generator_parse(secp256k1_ctx_verify_amounts, &tag, &vchAssetTag[0]) != 1)
|
||||
return false;
|
||||
|
||||
if (!secp256k1_rangeproof_verify(secp256k1_ctx_verify_amounts, &min_value, &max_value, &commit, vchRangeProof.data(), vchRangeProof.size(), NULL, 0, &tag)) {
|
||||
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)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue