Skip to content

Commit

Permalink
Merge #840: Remove the min(max( construction for the ct_exponent argu…
Browse files Browse the repository at this point in the history
…ment

edfa40e Remove the min(max( construction for the ct_exponent argument (Steven Roose)

Pull request description:

  As per @dgpv's suggestion here: #834 (comment)

  @dgpv could you review?

Tree-SHA512: 6c91a0a86a593f22ff42fb617aa96aeb97e2e5225e2b5b6980aa470f45ee613dab53de49dbbae20aecf7a4bf21cc005839be770917d55cfb2c9afd821c2d0231
  • Loading branch information
stevenroose committed Mar 25, 2020
2 parents ac5a435 + edfa40e commit 3c029f4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/blind.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ 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 = std::min(std::max((int)gArgs.GetArg("-ct_exponent", 0), -1), 18);
int ct_exponent = (int)gArgs.GetArg("-ct_exponent", 0);
int ct_bits = (int)gArgs.GetArg("-ct_bits", 52);
// If min_value is 0, scriptPubKey must be unspendable
uint64_t min_value = scriptPubKey.IsUnspendable() ? 0 : 1;
Expand Down

0 comments on commit 3c029f4

Please sign in to comment.