mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-17 13:07:54 +02:00
CT: CTxOutValue::IsAmount() -> CTxOutValue::IsExplicit()
This commit is contained in:
parent
e2077844f6
commit
96221efaab
16 changed files with 51 additions and 51 deletions
|
|
@ -49,7 +49,7 @@ bool UnblindOutput(const CKey &key, const CTxOut& txout, CAmount& amount_out, ui
|
|||
size_t msg_size = 64;
|
||||
uint64_t min_value, max_value, amount;
|
||||
secp256k1_pedersen_commitment commit;
|
||||
if (!txout.nAsset.IsCommitment() || txout.nValue.IsAmount())
|
||||
if (!txout.nAsset.IsCommitment() || txout.nValue.IsExplicit())
|
||||
return false;
|
||||
|
||||
secp256k1_generator gen;
|
||||
|
|
@ -124,8 +124,8 @@ int BlindOutputs(std::vector<uint256 >& input_blinding_factors, const std::vecto
|
|||
for (size_t nOut = 0; nOut < tx.vout.size(); nOut++) {
|
||||
CTxOut& out = tx.vout[nOut];
|
||||
// Wallet only understands all-blinded or all-unblinded
|
||||
assert((output_blinding_factors[nOut] != uint256()) == !out.nValue.IsAmount());
|
||||
assert(out.nValue.IsAmount() == out.nAsset.IsExplicit() || out.nValue.IsAmount() == out.nAsset.IsAssetGeneration());
|
||||
assert((output_blinding_factors[nOut] != uint256()) == !out.nValue.IsExplicit());
|
||||
assert(out.nValue.IsExplicit() == out.nAsset.IsExplicit() || out.nValue.IsExplicit() == out.nAsset.IsAssetGeneration());
|
||||
assert(out.nAsset.IsCommitment() == !out.nAsset.vchSurjectionproof.empty());
|
||||
if (output_blinding_factors[nOut] != uint256()) {
|
||||
assert(output_asset_blinding_factors[nOut] != uint256());
|
||||
|
|
@ -157,7 +157,7 @@ int BlindOutputs(std::vector<uint256 >& input_blinding_factors, const std::vecto
|
|||
|
||||
for (size_t nOut = 0; nOut < tx.vout.size(); nOut++) {
|
||||
CTxOut& out = tx.vout[nOut];
|
||||
if (out.nValue.IsAmount() && output_pubkeys[nOut].IsFullyValid()) {
|
||||
if (out.nValue.IsExplicit() && output_pubkeys[nOut].IsFullyValid()) {
|
||||
CTxOutValue& value = out.nValue;
|
||||
CTxOutAsset& asset = out.nAsset;
|
||||
CAmount amount = value.GetAmount();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue