aboutsummaryrefslogtreecommitdiff
path: root/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'main.cpp')
-rw-r--r--main.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/main.cpp b/main.cpp
index e4f1deb841..fe213c099a 100644
--- a/main.cpp
+++ b/main.cpp
@@ -42,8 +42,6 @@ map<uint160, vector<unsigned char> > mapPubKeys;
CCriticalSection cs_mapKeys;
CKey keyUser;
-int nDropMessagesTest = 0;
-
// Settings
int fGenerateBitcoins = false;
int64 nTransactionFee = 0;
@@ -1721,9 +1719,9 @@ bool ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv)
static map<unsigned int, vector<unsigned char> > mapReuseKey;
RandAddSeedPerfmon();
printf("received: %s (%d bytes)\n", strCommand.c_str(), vRecv.size());
- if (nDropMessagesTest > 0 && GetRand(nDropMessagesTest) == 0)
+ if (mapArgs.count("-dropmessagestest") && GetRand(atoi(mapArgs["-dropmessagestest"])) == 0)
{
- printf("dropmessages DROPPING RECV MESSAGE\n");
+ printf("dropmessagestest DROPPING RECV MESSAGE\n");
return true;
}
@@ -2315,6 +2313,8 @@ void BitcoinMiner()
Sleep(1000);
if (fShutdown)
return;
+ if (!fGenerateBitcoins)
+ return;
}
unsigned int nTransactionsUpdatedLast = nTransactionsUpdated;