mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-17 13:07:54 +02:00
CA: CTxOutAsset::IsAsset() -> CTxOutAsset::IsExplicit()
This commit is contained in:
parent
b1d487d3e7
commit
37230ccc1b
7 changed files with 16 additions and 16 deletions
|
|
@ -683,7 +683,7 @@ bool VerifyAmounts(const CCoinsViewCache& cache, const CTransaction& tx, std::ve
|
|||
if (val.IsNull() || asset.IsNull())
|
||||
return false;
|
||||
|
||||
if (asset.IsAsset()) {
|
||||
if (asset.IsExplicit()) {
|
||||
ret = secp256k1_generator_generate(secp256k1_ctx_verify_amounts, &gen, asset.GetAsset().begin());
|
||||
assert(ret != 0);
|
||||
}
|
||||
|
|
@ -726,7 +726,7 @@ bool VerifyAmounts(const CCoinsViewCache& cache, const CTransaction& tx, std::ve
|
|||
if (val.vchNonceCommitment.size() > CTxOutValue::nCommittedSize || val.vchRangeproof.size() > 5000)
|
||||
return false;
|
||||
|
||||
if (asset.IsAsset()) {
|
||||
if (asset.IsExplicit()) {
|
||||
ret = secp256k1_generator_generate(secp256k1_ctx_verify_amounts, &gen, asset.GetAsset().begin());
|
||||
assert(ret != 0);
|
||||
}
|
||||
|
|
@ -783,7 +783,7 @@ bool VerifyAmounts(const CCoinsViewCache& cache, const CTransaction& tx, std::ve
|
|||
for (size_t i = 0; i < tx.vin.size(); i++)
|
||||
{
|
||||
const CTxOutAsset& asset = cache.GetOutputFor(tx.vin[i]).nAsset;
|
||||
if (asset.IsAsset()) {
|
||||
if (asset.IsExplicit()) {
|
||||
ret = secp256k1_generator_generate(secp256k1_ctx_verify_amounts, &ephemeral_input_tags[i], asset.GetAsset().begin());
|
||||
assert(ret != 0);
|
||||
}
|
||||
|
|
@ -799,7 +799,7 @@ bool VerifyAmounts(const CCoinsViewCache& cache, const CTransaction& tx, std::ve
|
|||
{
|
||||
const CTxOutAsset& asset = tx.vout[i].nAsset;
|
||||
//No need for surjective proof
|
||||
if (asset.IsAsset()) {
|
||||
if (asset.IsExplicit()) {
|
||||
assert(asset.vchSurjectionproof.size() == 0);
|
||||
continue;
|
||||
}
|
||||
|
|
@ -826,7 +826,7 @@ bool VerifyCoinbaseAmount(const CTransaction& tx, const CAmountMap& mapFees)
|
|||
assert(tx.IsCoinBase());
|
||||
CAmountMap remaining = mapFees;
|
||||
for (unsigned int i = 0; i < tx.vout.size(); i++) {
|
||||
if (!tx.vout[i].nValue.IsAmount() || !tx.vout[i].nAsset.IsAsset())
|
||||
if (!tx.vout[i].nValue.IsAmount() || !tx.vout[i].nAsset.IsExplicit())
|
||||
return false;
|
||||
remaining[tx.vout[i].nAsset.GetAsset()] -= tx.vout[i].nValue.GetAmount();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue