mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-20 13:37:28 +02:00
elements: fixes for bitcoin/bitcoin#22976
This commit is contained in:
parent
eea9829aa6
commit
b33a4cdb4f
5 changed files with 63 additions and 64 deletions
|
|
@ -255,8 +255,8 @@ bool GenerateRangeproof(std::vector<unsigned char>& rangeproof, const std::vecto
|
|||
memcpy(asset_message+32, asset_blindptrs[asset_blindptrs.size()-1], 32);
|
||||
|
||||
// Sign rangeproof
|
||||
int ct_exponent = (int)gArgs.GetArg("-ct_exponent", 0);
|
||||
int ct_bits = (int)gArgs.GetArg("-ct_bits", 52);
|
||||
int ct_exponent = (int)gArgs.GetIntArg("-ct_exponent", 0);
|
||||
int ct_bits = (int)gArgs.GetIntArg("-ct_bits", 52);
|
||||
// If min_value is 0, scriptPubKey must be unspendable
|
||||
uint64_t min_value = scriptPubKey.IsUnspendable() ? 0 : 1;
|
||||
int res = secp256k1_rangeproof_sign(secp256k1_blind_context, rangeproof.data(), &nRangeProofLen, min_value, &value_commit, value_blindptrs.back(), nonce.begin(), ct_exponent, ct_bits, amount, asset_message, sizeof(asset_message), scriptPubKey.size() ? &scriptPubKey.front() : NULL, scriptPubKey.size(), &gen);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue