|
@@ -476,7 +476,7 @@ bool CWallet::GetMasternodeVinAndKeys(CTxIn& txinRet, CPubKey& pubKeyRet, CKey& |
|
|
|
|
|
// Find possible candidates |
|
|
std::vector<COutput> vPossibleCoins; |
|
|
AvailableCoins(vPossibleCoins, true, NULL, false, ONLY_10000); |
|
|
AvailableCoins(vPossibleCoins, true, NULL, false, ONLY_1000000); |
|
|
if (vPossibleCoins.empty()) { |
|
|
LogPrintf("CWallet::GetMasternodeVinAndKeys -- Could not locate any valid masternode vin\n"); |
|
|
return false; |
|
@@ -1024,7 +1024,7 @@ CAmount CWalletTx::GetUnlockedCredit() const |
|
|
const CTxOut& txout = vout[i]; |
|
|
|
|
|
if (pwallet->IsSpent(hashTx, i) || pwallet->IsLockedCoin(hashTx, i)) continue; |
|
|
if (fMasterNode && vout[i].nValue == 10000 * COIN) continue; // do not count MN-like outputs |
|
|
if (fMasterNode && vout[i].nValue == 1000000 * COIN) continue; // do not count MN-like outputs |
|
|
|
|
|
nCredit += pwallet->GetCredit(txout, ISMINE_SPENDABLE); |
|
|
if (!MoneyRange(nCredit)) |
|
@@ -1058,7 +1058,7 @@ CAmount CWalletTx::GetLockedCredit() const |
|
|
} |
|
|
|
|
|
// Add masternode collaterals which are handled likc locked coins |
|
|
else if (fMasterNode && vout[i].nValue == 10000 * COIN) { |
|
|
else if (fMasterNode && vout[i].nValue == 1000000 * COIN) { |
|
|
nCredit += pwallet->GetCredit(txout, ISMINE_SPENDABLE); |
|
|
} |
|
|
|
|
@@ -1133,7 +1133,7 @@ CAmount CWalletTx::GetLockedWatchOnlyCredit() const |
|
|
} |
|
|
|
|
|
// Add masternode collaterals which are handled likc locked coins |
|
|
else if (fMasterNode && vout[i].nValue == 10000 * COIN) { |
|
|
else if (fMasterNode && vout[i].nValue == 1000000 * COIN) { |
|
|
nCredit += pwallet->GetCredit(txout, ISMINE_WATCH_ONLY); |
|
|
} |
|
|
|
|
@@ -1662,14 +1662,14 @@ void CWallet::AvailableCoins( |
|
|
bool found = false; |
|
|
if (nCoinType == ONLY_DENOMINATED) { |
|
|
found = IsDenominatedAmount(pcoin->vout[i].nValue); |
|
|
} else if (nCoinType == ONLY_NOT10000IFMN) { |
|
|
found = !(fMasterNode && pcoin->vout[i].nValue == 10000 * COIN); |
|
|
} else if (nCoinType == ONLY_NONDENOMINATED_NOT10000IFMN) { |
|
|
} else if (nCoinType == ONLY_NOT1000000IFMN) { |
|
|
found = !(fMasterNode && pcoin->vout[i].nValue == 1000000 * COIN); |
|
|
} else if (nCoinType == ONLY_NONDENOMINATED_NOT1000000IFMN) { |
|
|
if (IsCollateralAmount(pcoin->vout[i].nValue)) continue; // do not use collateral amounts |
|
|
found = !IsDenominatedAmount(pcoin->vout[i].nValue); |
|
|
if (found && fMasterNode) found = pcoin->vout[i].nValue != 10000 * COIN; // do not use Hot MN funds |
|
|
} else if (nCoinType == ONLY_10000) { |
|
|
found = pcoin->vout[i].nValue == 10000 * COIN; |
|
|
if (found && fMasterNode) found = pcoin->vout[i].nValue != 1000000 * COIN; // do not use Hot MN funds |
|
|
} else if (nCoinType == ONLY_1000000) { |
|
|
found = pcoin->vout[i].nValue == 1000000 * COIN; |
|
|
} else { |
|
|
found = true; |
|
|
} |
|
@@ -1692,7 +1692,7 @@ void CWallet::AvailableCoins( |
|
|
if (mine == ISMINE_WATCH_ONLY && nWatchonlyConfig == 1) |
|
|
continue; |
|
|
|
|
|
if (IsLockedCoin((*it).first, i) && nCoinType != ONLY_10000) |
|
|
if (IsLockedCoin((*it).first, i) && nCoinType != ONLY_1000000) |
|
|
continue; |
|
|
if (pcoin->vout[i].nValue <= 0 && !fIncludeZeroValue) |
|
|
continue; |
|
@@ -2166,10 +2166,10 @@ bool CWallet::CreateTransaction(const vector<pair<CScript, CAmount> >& vecSend, |
|
|
if (!SelectCoins(nTotalValue, setCoins, nValueIn, coinControl, coin_type, useIX)) { |
|
|
if (coin_type == ALL_COINS) { |
|
|
strFailReason = _("Insufficient funds."); |
|
|
} else if (coin_type == ONLY_NOT10000IFMN) { |
|
|
strFailReason = _("Unable to locate enough funds for this transaction that are not equal 10000 OBSR."); |
|
|
} else if (coin_type == ONLY_NONDENOMINATED_NOT10000IFMN) { |
|
|
strFailReason = _("Unable to locate enough Obfuscation non-denominated funds for this transaction that are not equal 10000 OBSR."); |
|
|
} else if (coin_type == ONLY_NOT1000000IFMN) { |
|
|
strFailReason = _("Unable to locate enough funds for this transaction that are not equal 1000000 OBSR."); |
|
|
} else if (coin_type == ONLY_NONDENOMINATED_NOT1000000IFMN) { |
|
|
strFailReason = _("Unable to locate enough Obfuscation non-denominated funds for this transaction that are not equal 1000000 OBSR."); |
|
|
} else { |
|
|
strFailReason = _("Unable to locate enough Obfuscation denominated funds for this transaction."); |
|
|
strFailReason += " " + _("Obfuscation uses exact denominated amounts to send funds, you might simply need to anonymize some more coins."); |
|
|
0 comments on commit
bac799d