Merge remote-tracking branch 'upstream/v0.11.2.x' into v0.11.2.x

This commit is contained in:
crowning- 2015-03-22 05:10:43 +01:00
commit ffd9b295c1
7 changed files with 101 additions and 92 deletions

View File

@ -37,7 +37,7 @@ void CActiveMasternode::ManageStatus()
return; return;
} }
} else { } else {
service = CService(strMasterNodeAddr); service = CService(strMasterNodeAddr);
} }
LogPrintf("CActiveMasternode::ManageStatus() - Checking inbound connection to '%s'\n", service.ToString().c_str()); LogPrintf("CActiveMasternode::ManageStatus() - Checking inbound connection to '%s'\n", service.ToString().c_str());
@ -101,8 +101,8 @@ void CActiveMasternode::ManageStatus()
if(!darkSendSigner.SetKey(strMasterNodePrivKey, errorMessage, keyMasternode, pubKeyMasternode)) if(!darkSendSigner.SetKey(strMasterNodePrivKey, errorMessage, keyMasternode, pubKeyMasternode))
{ {
LogPrintf("Register::ManageStatus() - Error upon calling SetKey: %s\n", errorMessage.c_str()); LogPrintf("Register::ManageStatus() - Error upon calling SetKey: %s\n", errorMessage.c_str());
return; return;
} }
/* donations are not supported in dash.conf */ /* donations are not supported in dash.conf */
@ -128,63 +128,63 @@ void CActiveMasternode::ManageStatus()
// Send stop dseep to network for remote Masternode // Send stop dseep to network for remote Masternode
bool CActiveMasternode::StopMasterNode(std::string strService, std::string strKeyMasternode, std::string& errorMessage) { bool CActiveMasternode::StopMasterNode(std::string strService, std::string strKeyMasternode, std::string& errorMessage) {
CTxIn vin; CTxIn vin;
CKey keyMasternode; CKey keyMasternode;
CPubKey pubKeyMasternode; CPubKey pubKeyMasternode;
if(!darkSendSigner.SetKey(strKeyMasternode, errorMessage, keyMasternode, pubKeyMasternode)) { if(!darkSendSigner.SetKey(strKeyMasternode, errorMessage, keyMasternode, pubKeyMasternode)) {
LogPrintf("CActiveMasternode::StopMasterNode() - Error: %s\n", errorMessage.c_str()); LogPrintf("CActiveMasternode::StopMasterNode() - Error: %s\n", errorMessage.c_str());
return false; return false;
} }
return StopMasterNode(vin, CService(strService), keyMasternode, pubKeyMasternode, errorMessage); return StopMasterNode(vin, CService(strService), keyMasternode, pubKeyMasternode, errorMessage);
} }
// Send stop dseep to network for main Masternode // Send stop dseep to network for main Masternode
bool CActiveMasternode::StopMasterNode(std::string& errorMessage) { bool CActiveMasternode::StopMasterNode(std::string& errorMessage) {
if(status != MASTERNODE_IS_CAPABLE && status != MASTERNODE_REMOTELY_ENABLED) { if(status != MASTERNODE_IS_CAPABLE && status != MASTERNODE_REMOTELY_ENABLED) {
errorMessage = "Masternode is not in a running status"; errorMessage = "Masternode is not in a running status";
LogPrintf("CActiveMasternode::StopMasterNode() - Error: %s\n", errorMessage.c_str()); LogPrintf("CActiveMasternode::StopMasterNode() - Error: %s\n", errorMessage.c_str());
return false; return false;
} }
status = MASTERNODE_STOPPED; status = MASTERNODE_STOPPED;
CPubKey pubKeyMasternode; CPubKey pubKeyMasternode;
CKey keyMasternode; CKey keyMasternode;
if(!darkSendSigner.SetKey(strMasterNodePrivKey, errorMessage, keyMasternode, pubKeyMasternode)) if(!darkSendSigner.SetKey(strMasterNodePrivKey, errorMessage, keyMasternode, pubKeyMasternode))
{ {
LogPrintf("Register::ManageStatus() - Error upon calling SetKey: %s\n", errorMessage.c_str()); LogPrintf("Register::ManageStatus() - Error upon calling SetKey: %s\n", errorMessage.c_str());
return false; return false;
} }
return StopMasterNode(vin, service, keyMasternode, pubKeyMasternode, errorMessage); return StopMasterNode(vin, service, keyMasternode, pubKeyMasternode, errorMessage);
} }
// Send stop dseep to network for any Masternode // Send stop dseep to network for any Masternode
bool CActiveMasternode::StopMasterNode(CTxIn vin, CService service, CKey keyMasternode, CPubKey pubKeyMasternode, std::string& errorMessage) { bool CActiveMasternode::StopMasterNode(CTxIn vin, CService service, CKey keyMasternode, CPubKey pubKeyMasternode, std::string& errorMessage) {
pwalletMain->UnlockCoin(vin.prevout); pwalletMain->UnlockCoin(vin.prevout);
return Dseep(vin, service, keyMasternode, pubKeyMasternode, errorMessage, true); return Dseep(vin, service, keyMasternode, pubKeyMasternode, errorMessage, true);
} }
bool CActiveMasternode::Dseep(std::string& errorMessage) { bool CActiveMasternode::Dseep(std::string& errorMessage) {
if(status != MASTERNODE_IS_CAPABLE && status != MASTERNODE_REMOTELY_ENABLED) { if(status != MASTERNODE_IS_CAPABLE && status != MASTERNODE_REMOTELY_ENABLED) {
errorMessage = "Masternode is not in a running status"; errorMessage = "Masternode is not in a running status";
LogPrintf("CActiveMasternode::Dseep() - Error: %s\n", errorMessage.c_str()); LogPrintf("CActiveMasternode::Dseep() - Error: %s\n", errorMessage.c_str());
return false; return false;
} }
CPubKey pubKeyMasternode; CPubKey pubKeyMasternode;
CKey keyMasternode; CKey keyMasternode;
if(!darkSendSigner.SetKey(strMasterNodePrivKey, errorMessage, keyMasternode, pubKeyMasternode)) if(!darkSendSigner.SetKey(strMasterNodePrivKey, errorMessage, keyMasternode, pubKeyMasternode))
{ {
LogPrintf("Register::ManageStatus() - Error upon calling SetKey: %s\n", errorMessage.c_str()); LogPrintf("CActiveMasternode::Dseep() - Error upon calling SetKey: %s\n", errorMessage.c_str());
return false; return false;
} }
return Dseep(vin, service, keyMasternode, pubKeyMasternode, errorMessage, false); return Dseep(vin, service, keyMasternode, pubKeyMasternode, errorMessage, false);
} }
bool CActiveMasternode::Dseep(CTxIn vin, CService service, CKey keyMasternode, CPubKey pubKeyMasternode, std::string &retErrorMessage, bool stop) { bool CActiveMasternode::Dseep(CTxIn vin, CService service, CKey keyMasternode, CPubKey pubKeyMasternode, std::string &retErrorMessage, bool stop) {
@ -196,14 +196,14 @@ bool CActiveMasternode::Dseep(CTxIn vin, CService service, CKey keyMasternode, C
std::string strMessage = service.ToString() + boost::lexical_cast<std::string>(masterNodeSignatureTime) + boost::lexical_cast<std::string>(stop); std::string strMessage = service.ToString() + boost::lexical_cast<std::string>(masterNodeSignatureTime) + boost::lexical_cast<std::string>(stop);
if(!darkSendSigner.SignMessage(strMessage, errorMessage, vchMasterNodeSignature, keyMasternode)) { if(!darkSendSigner.SignMessage(strMessage, errorMessage, vchMasterNodeSignature, keyMasternode)) {
retErrorMessage = "sign message failed: " + errorMessage; retErrorMessage = "sign message failed: " + errorMessage;
LogPrintf("CActiveMasternode::Dseep() - Error: %s\n", retErrorMessage.c_str()); LogPrintf("CActiveMasternode::Dseep() - Error: %s\n", retErrorMessage.c_str());
return false; return false;
} }
if(!darkSendSigner.VerifyMessage(pubKeyMasternode, vchMasterNodeSignature, strMessage, errorMessage)) { if(!darkSendSigner.VerifyMessage(pubKeyMasternode, vchMasterNodeSignature, strMessage, errorMessage)) {
retErrorMessage = "Verify message failed: " + errorMessage; retErrorMessage = "Verify message failed: " + errorMessage;
LogPrintf("CActiveMasternode::Dseep() - Error: %s\n", retErrorMessage.c_str()); LogPrintf("CActiveMasternode::Dseep() - Error: %s\n", retErrorMessage.c_str());
return false; return false;
} }
@ -215,9 +215,9 @@ bool CActiveMasternode::Dseep(CTxIn vin, CService service, CKey keyMasternode, C
} }
else else
{ {
// Seems like we are trying to send a ping while the Masternode is not registered in the network // Seems like we are trying to send a ping while the Masternode is not registered in the network
retErrorMessage = "Darksend Masternode List doesn't include our Masternode, Shutting down Masternode pinging service! " + vin.ToString(); retErrorMessage = "Darksend Masternode List doesn't include our Masternode, Shutting down Masternode pinging service! " + vin.ToString();
LogPrintf("CActiveMasternode::Dseep() - Error: %s\n", retErrorMessage.c_str()); LogPrintf("CActiveMasternode::Dseep() - Error: %s\n", retErrorMessage.c_str());
status = MASTERNODE_NOT_CAPABLE; status = MASTERNODE_NOT_CAPABLE;
notCapableReason = retErrorMessage; notCapableReason = retErrorMessage;
return false; return false;
@ -231,7 +231,7 @@ bool CActiveMasternode::Dseep(CTxIn vin, CService service, CKey keyMasternode, C
} }
bool CActiveMasternode::Register(std::string strService, std::string strKeyMasternode, std::string txHash, std::string strOutputIndex, std::string strDonationAddress, std::string strDonationPercentage, std::string& errorMessage) { bool CActiveMasternode::Register(std::string strService, std::string strKeyMasternode, std::string txHash, std::string strOutputIndex, std::string strDonationAddress, std::string strDonationPercentage, std::string& errorMessage) {
CTxIn vin; CTxIn vin;
CPubKey pubKeyCollateralAddress; CPubKey pubKeyCollateralAddress;
CKey keyCollateralAddress; CKey keyCollateralAddress;
CPubKey pubKeyMasternode; CPubKey pubKeyMasternode;
@ -241,22 +241,22 @@ bool CActiveMasternode::Register(std::string strService, std::string strKeyMaste
if(!darkSendSigner.SetKey(strKeyMasternode, errorMessage, keyMasternode, pubKeyMasternode)) if(!darkSendSigner.SetKey(strKeyMasternode, errorMessage, keyMasternode, pubKeyMasternode))
{ {
LogPrintf("CActiveMasternode::Register() - Error upon calling SetKey: %s\n", errorMessage.c_str()); LogPrintf("CActiveMasternode::Register() - Error upon calling SetKey: %s\n", errorMessage.c_str());
return false; return false;
} }
if(!GetMasterNodeVin(vin, pubKeyCollateralAddress, keyCollateralAddress, txHash, strOutputIndex)) { if(!GetMasterNodeVin(vin, pubKeyCollateralAddress, keyCollateralAddress, txHash, strOutputIndex)) {
errorMessage = "could not allocate vin"; errorMessage = "could not allocate vin";
LogPrintf("Register::Register() - Error: %s\n", errorMessage.c_str()); LogPrintf("CActiveMasternode::Register() - Error: %s\n", errorMessage.c_str());
return false; return false;
} }
CBitcoinAddress address; CBitcoinAddress address;
if (strDonationAddress != "") if (strDonationAddress != "")
{ {
if(!address.SetString(strDonationAddress)) if(!address.SetString(strDonationAddress))
{ {
LogPrintf("Register::Register - Invalid Donation Address\n"); LogPrintf("CActiveMasternode::Register - Invalid Donation Address\n");
return false; return false;
} }
donationAddress.SetDestination(address.Get()); donationAddress.SetDestination(address.Get());
@ -264,18 +264,18 @@ bool CActiveMasternode::Register(std::string strService, std::string strKeyMaste
try { try {
donationPercentage = boost::lexical_cast<int>( strDonationPercentage ); donationPercentage = boost::lexical_cast<int>( strDonationPercentage );
} catch( boost::bad_lexical_cast const& ) { } catch( boost::bad_lexical_cast const& ) {
LogPrintf("Register::Register - Invalid Donation Percentage (Couldn't cast)\n"); LogPrintf("CActiveMasternode::Register - Invalid Donation Percentage (Couldn't cast)\n");
return false; return false;
} }
if(donationPercentage < 0 || donationPercentage > 100) if(donationPercentage < 0 || donationPercentage > 100)
{ {
LogPrintf("Register::Register - Donation Percentage Out Of Range\n"); LogPrintf("CActiveMasternode::Register - Donation Percentage Out Of Range\n");
return false; return false;
} }
} }
return Register(vin, CService(strService), keyCollateralAddress, pubKeyCollateralAddress, keyMasternode, pubKeyMasternode, donationAddress, donationPercentage, errorMessage); return Register(vin, CService(strService), keyCollateralAddress, pubKeyCollateralAddress, keyMasternode, pubKeyMasternode, donationAddress, donationPercentage, errorMessage);
} }
bool CActiveMasternode::Register(CTxIn vin, CService service, CKey keyCollateralAddress, CPubKey pubKeyCollateralAddress, CKey keyMasternode, CPubKey pubKeyMasternode, CScript donationAddress, int donationPercentage, std::string &retErrorMessage) { bool CActiveMasternode::Register(CTxIn vin, CService service, CKey keyCollateralAddress, CPubKey pubKeyCollateralAddress, CKey keyMasternode, CPubKey pubKeyMasternode, CScript donationAddress, int donationPercentage, std::string &retErrorMessage) {
@ -290,16 +290,16 @@ bool CActiveMasternode::Register(CTxIn vin, CService service, CKey keyCollateral
std::string strMessage = service.ToString() + boost::lexical_cast<std::string>(masterNodeSignatureTime) + vchPubKey + vchPubKey2 + boost::lexical_cast<std::string>(PROTOCOL_VERSION) + donationAddress.ToString() + boost::lexical_cast<std::string>(donationPercentage); std::string strMessage = service.ToString() + boost::lexical_cast<std::string>(masterNodeSignatureTime) + vchPubKey + vchPubKey2 + boost::lexical_cast<std::string>(PROTOCOL_VERSION) + donationAddress.ToString() + boost::lexical_cast<std::string>(donationPercentage);
if(!darkSendSigner.SignMessage(strMessage, errorMessage, vchMasterNodeSignature, keyCollateralAddress)) { if(!darkSendSigner.SignMessage(strMessage, errorMessage, vchMasterNodeSignature, keyCollateralAddress)) {
retErrorMessage = "sign message failed: " + errorMessage; retErrorMessage = "sign message failed: " + errorMessage;
LogPrintf("CActiveMasternode::Register() - Error: %s\n", retErrorMessage.c_str()); LogPrintf("CActiveMasternode::Register() - Error: %s\n", retErrorMessage.c_str());
return false; return false;
} }
if(!darkSendSigner.VerifyMessage(pubKeyCollateralAddress, vchMasterNodeSignature, strMessage, errorMessage)) { if(!darkSendSigner.VerifyMessage(pubKeyCollateralAddress, vchMasterNodeSignature, strMessage, errorMessage)) {
retErrorMessage = "Verify message failed: " + errorMessage; retErrorMessage = "Verify message failed: " + errorMessage;
LogPrintf("CActiveMasternode::Register() - Error: %s\n", retErrorMessage.c_str()); LogPrintf("CActiveMasternode::Register() - Error: %s\n", retErrorMessage.c_str());
return false; return false;
} }
CMasternode* pmn = mnodeman.Find(vin); CMasternode* pmn = mnodeman.Find(vin);
if(pmn == NULL) if(pmn == NULL)
@ -318,7 +318,7 @@ bool CActiveMasternode::Register(CTxIn vin, CService service, CKey keyCollateral
} }
bool CActiveMasternode::GetMasterNodeVin(CTxIn& vin, CPubKey& pubkey, CKey& secretKey) { bool CActiveMasternode::GetMasterNodeVin(CTxIn& vin, CPubKey& pubkey, CKey& secretKey) {
return GetMasterNodeVin(vin, pubkey, secretKey, "", ""); return GetMasterNodeVin(vin, pubkey, secretKey, "", "");
} }
bool CActiveMasternode::GetMasterNodeVin(CTxIn& vin, CPubKey& pubkey, CKey& secretKey, std::string strTxHash, std::string strOutputIndex) { bool CActiveMasternode::GetMasterNodeVin(CTxIn& vin, CPubKey& pubkey, CKey& secretKey, std::string strTxHash, std::string strOutputIndex) {
@ -329,35 +329,35 @@ bool CActiveMasternode::GetMasterNodeVin(CTxIn& vin, CPubKey& pubkey, CKey& secr
COutput *selectedOutput; COutput *selectedOutput;
// Find the vin // Find the vin
if(!strTxHash.empty()) { if(!strTxHash.empty()) {
// Let's find it // Let's find it
uint256 txHash(strTxHash); uint256 txHash(strTxHash);
int outputIndex = boost::lexical_cast<int>(strOutputIndex); int outputIndex = boost::lexical_cast<int>(strOutputIndex);
bool found = false; bool found = false;
BOOST_FOREACH(COutput& out, possibleCoins) { BOOST_FOREACH(COutput& out, possibleCoins) {
if(out.tx->GetHash() == txHash && out.i == outputIndex) if(out.tx->GetHash() == txHash && out.i == outputIndex)
{ {
selectedOutput = &out; selectedOutput = &out;
found = true; found = true;
break; break;
} }
} }
if(!found) { if(!found) {
LogPrintf("CActiveMasternode::GetMasterNodeVin - Could not locate valid vin\n"); LogPrintf("CActiveMasternode::GetMasterNodeVin - Could not locate valid vin\n");
return false; return false;
} }
} else { } else {
// No output specified, Select the first one // No output specified, Select the first one
if(possibleCoins.size() > 0) { if(possibleCoins.size() > 0) {
selectedOutput = &possibleCoins[0]; selectedOutput = &possibleCoins[0];
} else { } else {
LogPrintf("CActiveMasternode::GetMasterNodeVin - Could not locate specified vin from possible list\n"); LogPrintf("CActiveMasternode::GetMasterNodeVin - Could not locate specified vin from possible list\n");
return false; return false;
} }
} }
// At this point we have a selected output, retrieve the associated info // At this point we have a selected output, retrieve the associated info
return GetVinFromOutput(*selectedOutput, vin, pubkey, secretKey); return GetVinFromOutput(*selectedOutput, vin, pubkey, secretKey);
} }
@ -366,10 +366,10 @@ bool CActiveMasternode::GetVinFromOutput(COutput out, CTxIn& vin, CPubKey& pubke
CScript pubScript; CScript pubScript;
vin = CTxIn(out.tx->GetHash(),out.i); vin = CTxIn(out.tx->GetHash(),out.i);
pubScript = out.tx->vout[out.i].scriptPubKey; // the inputs PubKey pubScript = out.tx->vout[out.i].scriptPubKey; // the inputs PubKey
CTxDestination address1; CTxDestination address1;
ExtractDestination(pubScript, address1); ExtractDestination(pubScript, address1);
CBitcoinAddress address2(address1); CBitcoinAddress address2(address1);
@ -401,7 +401,7 @@ vector<COutput> CActiveMasternode::SelectCoinsMasternode()
BOOST_FOREACH(const COutput& out, vCoins) BOOST_FOREACH(const COutput& out, vCoins)
{ {
if(out.tx->vout[out.i].nValue == 1000*COIN) { //exactly if(out.tx->vout[out.i].nValue == 1000*COIN) { //exactly
filteredCoins.push_back(out); filteredCoins.push_back(out);
} }
} }
return filteredCoins; return filteredCoins;

View File

@ -102,7 +102,8 @@ void CDarksendPool::ProcessMessageDarksend(CNode* pfrom, std::string& strCommand
} }
} else if (strCommand == "dsq") { //Darksend Queue } else if (strCommand == "dsq") { //Darksend Queue
LOCK(cs_darksend); TRY_LOCK(cs_darksend, lockRecv);
if(!lockRecv) return;
if (pfrom->nVersion < MIN_POOL_PEER_PROTO_VERSION) { if (pfrom->nVersion < MIN_POOL_PEER_PROTO_VERSION) {
return; return;
@ -645,6 +646,7 @@ void CDarksendPool::SetNull(bool clearEverything){
} }
//automatically downgrade for 11.2, blinding will be supported in 11.3/12.0 //automatically downgrade for 11.2, blinding will be supported in 11.3/12.0
nTrickleInputsOutputs = INT_MAX;
Downgrade(); Downgrade();
// -- seed random number generator (used for ordering output lists) // -- seed random number generator (used for ordering output lists)
@ -2508,7 +2510,6 @@ void CDarksendPool::RelayInAnon(std::vector<CTxIn>& vin, std::vector<CTxOut>& vo
void CDarksendPool::RelayIn(const std::vector<CTxDSIn>& vin, const int64_t& nAmount, const CTransaction& txCollateral, const std::vector<CTxDSOut>& vout) void CDarksendPool::RelayIn(const std::vector<CTxDSIn>& vin, const int64_t& nAmount, const CTransaction& txCollateral, const std::vector<CTxDSOut>& vout)
{ {
LOCK(cs_vNodes);
std::vector<CTxIn> vin2; std::vector<CTxIn> vin2;
std::vector<CTxOut> vout2; std::vector<CTxOut> vout2;
@ -2519,6 +2520,7 @@ void CDarksendPool::RelayIn(const std::vector<CTxDSIn>& vin, const int64_t& nAmo
BOOST_FOREACH(CTxDSOut out, vout) BOOST_FOREACH(CTxDSOut out, vout)
vout2.push_back(out); vout2.push_back(out);
LOCK(cs_vNodes);
BOOST_FOREACH(CNode* pnode, vNodes) BOOST_FOREACH(CNode* pnode, vNodes)
{ {
if(!pSubmittedToMasternode) return; if(!pSubmittedToMasternode) return;

View File

@ -7,6 +7,7 @@
#include "core.h" #include "core.h"
#include "main.h" #include "main.h"
#include "sync.h"
#include "activemasternode.h" #include "activemasternode.h"
#include "masternodeman.h" #include "masternodeman.h"
#include "darksend-relay.h" #include "darksend-relay.h"

View File

@ -2742,8 +2742,11 @@ bool FindBlockPos(CValidationState &state, CDiskBlockPos &pos, unsigned int nAdd
pos.nPos = infoLastBlockFile.nSize; pos.nPos = infoLastBlockFile.nSize;
} }
infoLastBlockFile.nSize += nAddSize;
infoLastBlockFile.AddBlock(nHeight, nTime); infoLastBlockFile.AddBlock(nHeight, nTime);
if (fKnown)
infoLastBlockFile.nSize = std::max(pos.nPos + nAddSize, infoLastBlockFile.nSize);
else
infoLastBlockFile.nSize += nAddSize;
if (!fKnown) { if (!fKnown) {
unsigned int nOldChunks = (pos.nPos + BLOCKFILE_CHUNK_SIZE - 1) / BLOCKFILE_CHUNK_SIZE; unsigned int nOldChunks = (pos.nPos + BLOCKFILE_CHUNK_SIZE - 1) / BLOCKFILE_CHUNK_SIZE;

View File

@ -7,6 +7,7 @@
#include "darksend.h" #include "darksend.h"
#include "core.h" #include "core.h"
#include "util.h" #include "util.h"
#include "sync.h"
#include "addrman.h" #include "addrman.h"
#include <boost/lexical_cast.hpp> #include <boost/lexical_cast.hpp>
@ -222,9 +223,11 @@ uint256 CMasternode::CalculateScore(int mod, int64_t nBlockHeight)
void CMasternode::Check() void CMasternode::Check()
{ {
LOCK(cs_main); //TODO: Random segfault with this line removed
TRY_LOCK(cs_main, lockRecv);
if(!lockRecv) return;
if(nScanningErrorCount >= MASTERNODE_SCANNING_ERROR_THESHOLD) if(nScanningErrorCount >= MASTERNODE_SCANNING_ERROR_THESHOLD)
{ {
activeState = MASTERNODE_POS_ERROR; activeState = MASTERNODE_POS_ERROR;
return; return;
@ -396,7 +399,7 @@ bool CMasternodePayments::ProcessBlock(int nBlockHeight)
if(!enabled) return false; if(!enabled) return false;
CMasternodePaymentWinner newWinner; CMasternodePaymentWinner newWinner;
int nMinimumAge = mnodeman.CountEnabled(); int nMinimumAge = mnodeman.CountEnabled();
uint256 hash; uint256 hash;
if(!GetBlockHash(hash, nBlockHeight-10)) return false; if(!GetBlockHash(hash, nBlockHeight-10)) return false;
int nHash; int nHash;

View File

@ -488,7 +488,7 @@ void CMasternodeMan::ProcessMasternodeConnections()
LOCK(cs_vNodes); LOCK(cs_vNodes);
if(!darkSendPool.pSubmittedToMasternode) return; if(!darkSendPool.pSubmittedToMasternode) return;
BOOST_FOREACH(CNode* pnode, vNodes) BOOST_FOREACH(CNode* pnode, vNodes)
{ {
if(darkSendPool.pSubmittedToMasternode->addr == pnode->addr) continue; if(darkSendPool.pSubmittedToMasternode->addr == pnode->addr) continue;
@ -557,7 +557,7 @@ void CMasternodeMan::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
if(donationPercentage < 0 || donationPercentage > 100){ if(donationPercentage < 0 || donationPercentage > 100){
LogPrintf("dsee - donation percentage out of range %d\n", donationPercentage); LogPrintf("dsee - donation percentage out of range %d\n", donationPercentage);
return; return;
} }
if(protocolVersion < nMasternodeMinProtocol) { if(protocolVersion < nMasternodeMinProtocol) {

View File

@ -160,7 +160,7 @@ void OverviewPage::handleTransactionClicked(const QModelIndex &index)
OverviewPage::~OverviewPage() OverviewPage::~OverviewPage()
{ {
disconnect(timer, SIGNAL(timeout()), this, SLOT(darkSendStatus())); if(!fLiteMode) disconnect(timer, SIGNAL(timeout()), this, SLOT(darkSendStatus()));
delete ui; delete ui;
} }