From 6435e06408dc441bc3516508c2ba9f2f1fdd2193 Mon Sep 17 00:00:00 2001 From: Byron Hambly Date: Wed, 24 Jun 2026 14:21:37 +0200 Subject: [PATCH] validation: check subsidy asset and amount are explicit --- src/validation.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/validation.cpp b/src/validation.cpp index 86de340c14..9412753f14 100644 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -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(); } }