Adopt GetMNCollateral
@@ -1543,7 +1543,7 @@ void CWallet::AvailableCoinsMN(vector<COutput>& vCoins, bool fOnlyConfirmed, con
found = true;
if (IsCollateralAmount(pcoin->vout[i].nValue)) continue; // do not use collateral amounts
found = !IsDenominatedAmount(pcoin->vout[i].nValue);
- if(found && coin_type == ONLY_NONDENOMINATED_NOTMN) found = (pcoin->vout[i].nValue != 5000*COIN); // do not use MN funds 5,000 DNR
+ if(found && coin_type == ONLY_NONDENOMINATED_NOTMN) found = (pcoin->vout[i].nValue != GetMNCollateral()*COIN); // do not use MN funds 5,000 DNR
} else {
found = true;
}
@@ -2197,7 +2197,7 @@ bool CWallet::SelectCoinsByDenominations(int nDenom, int64_t nValueMin, int64_t
{
//there's no reason to allow inputs less than 1 COIN into DS (other than denominations smaller than that amount)
if(out.tx->vout[out.i].nValue < 1*COIN && out.tx->vout[out.i].nValue != (.1*COIN)+100) continue;
- if(fMasterNode && out.tx->vout[out.i].nValue == 5000*COIN) continue; //masternode input 5,000 DNR
+ if(fMasterNode && out.tx->vout[out.i].nValue == GetMNCollateral()*COIN) continue; //masternode input 5,000 DNR
if(nValueRet + out.tx->vout[out.i].nValue <= nValueMax){
bool fAccepted = false;
@@ -2273,7 +2273,7 @@ bool CWallet::SelectCoinsDark(int64_t nValueMin, int64_t nValueMax, std::vector<
{
//there's no reason to allow inputs less than 1 COIN into DS (other than denominations smaller than that amount)
if(out.tx->vout[out.i].nValue < 1*COIN && out.tx->vout[out.i].nValue != (.1*COIN)+100) continue;
- if(fMasterNode && out.tx->vout[out.i].nValue == 5000*COIN) continue; //masternode input 5,000 DNR
+ if(fMasterNode && out.tx->vout[out.i].nValue == GetMNCollateral()*COIN) continue; //masternode input 5,000 DNR
if(nValueRet + out.tx->vout[out.i].nValue <= nValueMax){
CTxIn vin = CTxIn(out.tx->GetHash(),out.i);
