diff --git a/src/checkpointsync.cpp b/src/checkpointsync.cpp index 3d08f8a543..10b52ea314 100644 --- a/src/checkpointsync.cpp +++ b/src/checkpointsync.cpp @@ -474,7 +474,7 @@ Value getcheckpoint(const Array& params, bool fHelp) result.push_back(Pair("subscribemode", IsSyncCheckpointEnforced()? "enforce" : "advisory")); if (mapArgs.count("-checkpointkey")) result.push_back(Pair("checkpointmaster", true)); - + result.push_back(Pair("enforcing", GetAdjustedTime() > enforceMasternodePaymentsTime ? "on" : "off")); return result; } diff --git a/src/clientversion.h b/src/clientversion.h index 6e9113af02..70daad55f0 100644 --- a/src/clientversion.h +++ b/src/clientversion.h @@ -9,7 +9,7 @@ #define CLIENT_VERSION_MAJOR 0 #define CLIENT_VERSION_MINOR 10 #define CLIENT_VERSION_REVISION 13 -#define CLIENT_VERSION_BUILD 10 +#define CLIENT_VERSION_BUILD 11 // Set to true for release, false for prerelease or test build #define CLIENT_VERSION_IS_RELEASE true diff --git a/src/darksend.cpp b/src/darksend.cpp index cd86f3a201..e622738d72 100644 --- a/src/darksend.cpp +++ b/src/darksend.cpp @@ -28,8 +28,6 @@ std::vector darkSendDenominations; std::vector vecMasternodeAskedFor; /** The current darksends in progress on the network */ std::vector vecDarksendQueue; -/** Override masternode */ -std::string strUseMasternode = ""; /* *** BEGIN DARKSEND MAGIC - DARKCOIN ********** Copyright 2014, Darkcoin Developers @@ -1047,21 +1045,6 @@ int CDarkSendPool::GetCurrentMasterNode(int mod, int64 nBlockHeight) unsigned int score = 0; int winner = -1; - // override the winning masternode - if(!strUseMasternode.empty()){ - CService overrideAddr = CService(strUseMasternode); - - BOOST_FOREACH(CMasterNode mn, darkSendMasterNodes) { - if(mn.addr == overrideAddr){ - LogPrintf("CDarkSendPool::GetCurrentMasterNode() - override %s\n", mn.addr.ToString().c_str()); - return i; - } - i++; - } - - return -1; - } - // scan for winner BOOST_FOREACH(CMasterNode mn, darkSendMasterNodes) { mn.Check(); @@ -1346,21 +1329,6 @@ int CDarkSendPool::GetMasternodeByRank(int findRank) { int i = 0; - // override the selected masternode - if(!strUseMasternode.empty()){ - CService overrideAddr = CService(strUseMasternode); - - BOOST_FOREACH(CMasterNode mn, darkSendMasterNodes) { - if(mn.addr == overrideAddr){ - LogPrintf("CDarkSendPool::GetMasternodeByRank() - override %s\n", mn.addr.ToString().c_str()); - return i; - } - i++; - } - - return -1; - } - std::vector > vecMasternodeScores; i = 0; diff --git a/src/darksend.h b/src/darksend.h index 708b851344..b72b2493bc 100644 --- a/src/darksend.h +++ b/src/darksend.h @@ -22,7 +22,6 @@ extern CDarkSendSigner darkSendSigner; extern std::vector darkSendMasterNodes; extern std::vector darkSendDenominations; extern std::string strMasterNodePrivKey; -extern std::string strUseMasternode; extern std::vector vecDarksendQueue; extern std::vector vecMasternodeAskedFor; diff --git a/src/init.cpp b/src/init.cpp index 3116f71773..23776aad32 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -1182,9 +1182,6 @@ bool AppInit2(boost::thread_group& threadGroup) LogPrintf("Darksend rounds %d\n", nDarksendRounds); LogPrintf("Anonymize Darkcoin Amount %d\n", nAnonymizeDarkcoinAmount); - //override masternode - strUseMasternode = GetArg("-usemasternode", ""); - darkSendDenominations.push_back( (500 * COIN)+1 ); darkSendDenominations.push_back( (100 * COIN)+1 ); darkSendDenominations.push_back( (10 * COIN)+1 ); diff --git a/src/main.cpp b/src/main.cpp index 536c5a562c..0dce843b2e 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -4185,6 +4185,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv) if (pfrom->nVersion != darkSendPool.MIN_PEER_PROTO_VERSION) { return true; } + bool fIsInitialDownload = IsInitialBlockDownload(); if(fIsInitialDownload) return true; @@ -5266,10 +5267,7 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn) txNew.vout.resize(1); txNew.vout[0].scriptPubKey = scriptPubKeyIn; - LogPrintf("%d\n", scriptPubKeyIn[0]); - // start masternode payments - bool bMasterNodePayment = false; // fees to foundation @@ -5297,27 +5295,26 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn) winningNode = darkSendPool.GetCurrentMasterNode(1); if(winningNode >= 0){ payee.SetDestination(darkSendMasterNodes[winningNode].pubkey.GetID()); + pblock->payee = payee; + + payments++; + txNew.vout.resize(payments); + + txNew.vout[payments-1].scriptPubKey = payee; + txNew.vout[payments-1].nValue = 0; + + CTxDestination address1; + ExtractDestination(payee, address1); + CBitcoinAddress address2(address1); + + LogPrintf("Masternode payment to %s\n", address2.ToString().c_str()); } else { //if enforcing, then return NULL because the block will be rejected - if(pblock->MasterNodePaymentsEnforcing()) { + if(GetAdjustedTime() > enforceMasternodePaymentsTime) { LogPrintf("CreateNewBlock: Failed to detect masternode to pay\n"); return NULL; } } - - pblock->payee = payee; - - payments++; - txNew.vout.resize(payments); - - txNew.vout[payments-1].scriptPubKey = payee; - txNew.vout[payments-1].nValue = 0; - - CTxDestination address1; - ExtractDestination(payee, address1); - CBitcoinAddress address2(address1); - - LogPrintf("Masternode payment to %s\n", address2.ToString().c_str()); } // Add our coinbase tx as first transaction diff --git a/src/qt/sendcoinsdialog.cpp b/src/qt/sendcoinsdialog.cpp index 4dab227648..6a0f440753 100644 --- a/src/qt/sendcoinsdialog.cpp +++ b/src/qt/sendcoinsdialog.cpp @@ -522,7 +522,7 @@ void SendCoinsDialog::coinControlChangeEdited(const QString & text) else if (!CBitcoinAddress(text.toStdString()).IsValid()) { ui->labelCoinControlChangeLabel->setStyleSheet("QLabel{color:red;}"); - ui->labelCoinControlChangeLabel->setText(tr("Warning: Invalid Bitcoin address")); + ui->labelCoinControlChangeLabel->setText(tr("Warning: Invalid Darkcoin address")); } else {