Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
init
  • Loading branch information
raymaker committed Jun 1, 2018
1 parent 5fbe909 commit 10ab750
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 18 deletions.
2 changes: 1 addition & 1 deletion src/activemasternode.cpp
Expand Up @@ -475,7 +475,7 @@ vector<COutput> CActiveMasternode::SelectCoinsMasternode()

// Filter
BOOST_FOREACH (const COutput& out, vCoins) {
if (out.tx->vout[out.i].nValue == 1000 * COIN) { //exactly
if (out.tx->vout[out.i].nValue == 50000 * COIN) { //exactly
filteredCoins.push_back(out);
}
}
Expand Down
6 changes: 3 additions & 3 deletions src/masternode.cpp
Expand Up @@ -212,7 +212,7 @@ void CMasternode::Check(bool forceCheck)
if (!unitTest) {
CValidationState state;
CMutableTransaction tx = CMutableTransaction();
CTxOut vout = CTxOut(999.99 * COIN, obfuScationPool.collateralPubKey);
CTxOut vout = CTxOut(49999.99 * COIN, obfuScationPool.collateralPubKey);
tx.vin.push_back(vin);
tx.vout.push_back(vout);

Expand Down Expand Up @@ -278,7 +278,7 @@ int64_t CMasternode::GetLastPaid()

if (masternodePayments.mapMasternodeBlocks.count(BlockReading->nHeight)) {
/*
Search for this payee, with at least 2 votes. This will aid in consensus allowing the network
Search for this payee, with at least 2 votes. This will aid in consensus allowing the network
to converge on the same payees quickly, then keep the same schedule.
*/
if (masternodePayments.mapMasternodeBlocks[BlockReading->nHeight].HasPayeeWithVotes(mnpayee, 2)) {
Expand Down Expand Up @@ -572,7 +572,7 @@ bool CMasternodeBroadcast::CheckInputsAndAdd(int& nDoS)

CValidationState state;
CMutableTransaction tx = CMutableTransaction();
CTxOut vout = CTxOut(999.99 * COIN, obfuScationPool.collateralPubKey);
CTxOut vout = CTxOut(49999.99 * COIN, obfuScationPool.collateralPubKey);
tx.vin.push_back(vin);
tx.vout.push_back(vout);

Expand Down
2 changes: 1 addition & 1 deletion src/masternodeman.cpp
Expand Up @@ -987,7 +987,7 @@ void CMasternodeMan::ProcessMessage(CNode* pfrom, std::string& strCommand, CData

CValidationState state;
CMutableTransaction tx = CMutableTransaction();
CTxOut vout = CTxOut(999.99 * COIN, obfuScationPool.collateralPubKey);
CTxOut vout = CTxOut(49999.99 * COIN, obfuScationPool.collateralPubKey);
tx.vin.push_back(vin);
tx.vout.push_back(vout);

Expand Down
2 changes: 1 addition & 1 deletion src/obfuscation.cpp
Expand Up @@ -2112,7 +2112,7 @@ bool CObfuScationSigner::IsVinAssociatedWithPubkey(CTxIn& vin, CPubKey& pubkey)
uint256 hash;
if (GetTransaction(vin.prevout.hash, txVin, hash, true)) {
BOOST_FOREACH (CTxOut out, txVin.vout) {
if (out.nValue == 1000 * COIN) {
if (out.nValue == 50000 * COIN) {
if (out.scriptPubKey == payee2) return true;
}
}
Expand Down
1 change: 1 addition & 0 deletions src/qt/multisenddialog.cpp
Expand Up @@ -5,6 +5,7 @@
#include "ui_multisenddialog.h"
#include "walletmodel.h"
#include <QLineEdit>
#include <QStyle>
#include <QMessageBox>
#include <boost/lexical_cast.hpp>

Expand Down
2 changes: 1 addition & 1 deletion src/spork.h
Expand Up @@ -45,7 +45,7 @@ using namespace boost;

#define SPORK_2_SWIFTTX_DEFAULT 978307200 //2001-1-1
#define SPORK_3_SWIFTTX_BLOCK_FILTERING_DEFAULT 1424217600 //2015-2-18
#define SPORK_5_MAX_VALUE_DEFAULT 1000 //1000 BWS
#define SPORK_5_MAX_VALUE_DEFAULT 50000 //50000 BWS
#define SPORK_7_MASTERNODE_SCANNING_DEFAULT 978307200 //2001-1-1
#define SPORK_8_MASTERNODE_PAYMENT_ENFORCEMENT_DEFAULT 4070908800 //OFF
#define SPORK_9_MASTERNODE_BUDGET_ENFORCEMENT_DEFAULT 4070908800 //OFF
Expand Down
14 changes: 7 additions & 7 deletions src/wallet.cpp
Expand Up @@ -1327,7 +1327,7 @@ CAmount CWallet::GetUnconfirmedZerocoinBalance() const
CAmount nUnconfirmed = 0;
CWalletDB walletdb(pwalletMain->strWalletFile);
list<CZerocoinMint> listMints = walletdb.ListMintedCoins(true, false, true);

std::map<libzerocoin::CoinDenomination, int> mapUnconfirmed;
for (const auto& denom : libzerocoin::zerocoinDenomList){
mapUnconfirmed.insert(make_pair(denom, 0));
Expand Down Expand Up @@ -1629,13 +1629,13 @@ void CWallet::AvailableCoins(vector<COutput>& vCoins, bool fOnlyConfirmed, const
if (nCoinType == ONLY_DENOMINATED) {
found = IsDenominatedAmount(pcoin->vout[i].nValue);
} else if (nCoinType == ONLY_NOT10000IFMN) {
found = !(fMasterNode && pcoin->vout[i].nValue == 1000 * COIN);
found = !(fMasterNode && pcoin->vout[i].nValue == 50000 * COIN);
} else if (nCoinType == ONLY_NONDENOMINATED_NOT10000IFMN) {
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 != 1000 * COIN; // do not use Hot MN funds
if (found && fMasterNode) found = pcoin->vout[i].nValue != 50000 * COIN; // do not use Hot MN funds
} else if (nCoinType == ONLY_10000) {
found = pcoin->vout[i].nValue == 1000 * COIN;
found = pcoin->vout[i].nValue == 50000 * COIN;
} else {
found = true;
}
Expand Down Expand Up @@ -2099,7 +2099,7 @@ bool CWallet::SelectCoinsDark(CAmount nValueMin, CAmount nValueMax, std::vector<
if (out.tx->vout[out.i].nValue < CENT) continue;
//do not allow collaterals to be selected
if (IsCollateralAmount(out.tx->vout[out.i].nValue)) continue;
if (fMasterNode && out.tx->vout[out.i].nValue == 1000 * COIN) continue; //masternode input
if (fMasterNode && out.tx->vout[out.i].nValue == 50000 * COIN) continue; //masternode input

if (nValueRet + out.tx->vout[out.i].nValue <= nValueMax) {
CTxIn vin = CTxIn(out.tx->GetHash(), out.i);
Expand Down Expand Up @@ -2630,7 +2630,7 @@ bool CWallet::CreateCoinStake(const CKeyStore& keystore, unsigned int nBits, int
LogPrintf("CreateCoinStake() : min input violation, nStakePile = %d minStakeInput = %d\n", nStakePile, Params().MinStakeInput() );
continue;
}

//iterates each utxo inside of CheckStakeKernelHash()
if (CheckStakeKernelHash(nBits, block, *pcoin.first, prevoutStake, nTxNewTime, nHashDrift, false, hashProofOfStake, true)) {
//Double check that this will pass time requirements
Expand Down Expand Up @@ -2691,7 +2691,7 @@ bool CWallet::CreateCoinStake(const CKeyStore& keystore, unsigned int nBits, int
if (fKernelFound)
break; // if kernel is found stop searching
}

if (nCredit == 0 || nCredit > nBalance - nReserveBalance)
return false;

Expand Down
8 changes: 4 additions & 4 deletions src/wallet.h
Expand Up @@ -315,7 +315,7 @@ class CWallet : public CCryptoKeyStore, public CValidationInterface
{
fBackupMints = fEnabled;
}

bool isMultiSendEnabled()
{
return fMultiSendMasternodeReward || fMultiSendStake;
Expand Down Expand Up @@ -1054,7 +1054,7 @@ class CWalletTx : public CMerkleTx
const CTxIn vin = CTxIn(hashTx, i);

if (pwallet->IsSpent(hashTx, i) || pwallet->IsLockedCoin(hashTx, i)) continue;
if (fMasterNode && vout[i].nValue == 1000 * COIN) continue; // do not count MN-like outputs
if (fMasterNode && vout[i].nValue == 50000 * COIN) continue; // do not count MN-like outputs

const int rounds = pwallet->GetInputObfuscationRounds(vin);
if (rounds >= -2 && rounds < nZeromintPercentage) {
Expand Down Expand Up @@ -1118,7 +1118,7 @@ class CWalletTx : public CMerkleTx
const CTxOut& txout = vout[i];

if (pwallet->IsSpent(hashTx, i) || pwallet->IsLockedCoin(hashTx, i)) continue;
if (fMasterNode && vout[i].nValue == 1000 * COIN) continue; // do not count MN-like outputs
if (fMasterNode && vout[i].nValue == 50000 * COIN) continue; // do not count MN-like outputs

nCredit += pwallet->GetCredit(txout, ISMINE_SPENDABLE);
if (!MoneyRange(nCredit))
Expand Down Expand Up @@ -1152,7 +1152,7 @@ class CWalletTx : public CMerkleTx
}

// Add masternode collaterals which are handled likc locked coins
if (fMasterNode && vout[i].nValue == 1000 * COIN) {
if (fMasterNode && vout[i].nValue == 50000 * COIN) {
nCredit += pwallet->GetCredit(txout, ISMINE_SPENDABLE);
}

Expand Down

0 comments on commit 10ab750

Please sign in to comment.