mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-16 13:01:19 +02:00
validation: check subsidy asset and amount are explicit
This commit is contained in:
parent
71b3bfe271
commit
6435e06408
1 changed files with 1 additions and 1 deletions
|
|
@ -673,7 +673,7 @@ private:
|
|||
// calculate the burned subsidy value from the tx
|
||||
CAmount subsidy = 0;
|
||||
for (const CTxOut& txout : tx.vout) {
|
||||
if (txout.scriptPubKey.IsUnspendable() && txout.nAsset.GetAsset() == Params().GetConsensus().pegged_asset && !txout.IsFee()) {
|
||||
if (txout.scriptPubKey.IsUnspendable() && !txout.IsFee() && txout.nAsset.IsExplicit() && txout.nValue.IsExplicit() && txout.nAsset.GetAsset() == Params().GetConsensus().pegged_asset) {
|
||||
subsidy += txout.nValue.GetAmount();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue