mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-14 12:43:40 +02:00
Reject issuances with explicit values but non-empty range proofs
This commit is contained in:
parent
5ad7e17034
commit
7ad4d950a4
1 changed files with 4 additions and 0 deletions
|
|
@ -719,6 +719,10 @@ static bool VerifyIssuanceAmount(secp256k1_pedersen_commitment& commit, secp256k
|
|||
if (!MoneyRange(value.GetAmount()) || value.GetAmount() == 0) {
|
||||
return false;
|
||||
}
|
||||
if (!vchRangeproof.empty()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
ret = secp256k1_pedersen_commit(secp256k1_ctx_verify_amounts, &commit, explBlinds, value.GetAmount(), &gen);
|
||||
// The explBlinds are all 0, and the amount is not 0. So secp256k1_pedersen_commit does not fail.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue