Seperate asset amount logic from rvn logic
@@ -93,6 +93,13 @@ CAmount CTransaction::GetValueOut() const
{
CAmount nValueOut = 0;
for (const auto& tx_out : vout) {
+
+ // Because we don't want to deal with assets messing up this calculation
+ // If this is an asset tx, we should move onto the next output in the transaction
+ // This will also help with processing speed of transaction that contain a large amounts of asset outputs in a transaction
+ if (tx_out.scriptPubKey.IsAssetScript())
+ continue;
+
nValueOut += tx_out.nValue;
if (!MoneyRange(tx_out.nValue) || !MoneyRange(nValueOut))
throw std::runtime_error(std::string(__func__) + ": value out of range");
