This commit is contained in:
MoneroOcean
2020-07-15 12:24:57 -07:00
parent 90412e64cc
commit 199c643e80

View File

@@ -296,14 +296,20 @@ namespace cryptonote
{ {
if (tx.blob_type == BLOB_TYPE_CRYPTONOTE_XHV && tx.vin[0].type() == typeid(txin_offshore)) { if (tx.blob_type == BLOB_TYPE_CRYPTONOTE_XHV && tx.vin[0].type() == typeid(txin_offshore)) {
CHECKED_GET_SPECIFIC_VARIANT(in, const txin_offshore, tokey_in, false); CHECKED_GET_SPECIFIC_VARIANT(in, const txin_offshore, tokey_in, false);
if(money > tokey_in.amount + money)
return false;
money += tokey_in.amount;
} else if (tx.blob_type == BLOB_TYPE_CRYPTONOTE_XHV && tx.vin[0].type() == typeid(txin_onshore)) { } else if (tx.blob_type == BLOB_TYPE_CRYPTONOTE_XHV && tx.vin[0].type() == typeid(txin_onshore)) {
CHECKED_GET_SPECIFIC_VARIANT(in, const txin_onshore, tokey_in, false); CHECKED_GET_SPECIFIC_VARIANT(in, const txin_onshore, tokey_in, false);
if(money > tokey_in.amount + money)
return false;
money += tokey_in.amount;
} else { } else {
CHECKED_GET_SPECIFIC_VARIANT(in, const txin_to_key, tokey_in, false); CHECKED_GET_SPECIFIC_VARIANT(in, const txin_to_key, tokey_in, false);
if(money > tokey_in.amount + money)
return false;
money += tokey_in.amount;
} }
if(money > tokey_in.amount + money)
return false;
money += tokey_in.amount;
} }
return true; return true;
} }