aboutsummaryrefslogtreecommitdiff
path: root/main.cpp
diff options
context:
space:
mode:
authors_nakamoto <s_nakamoto@1a98c847-1fd6-4fd8-948a-caf3550aa51b>2009-11-07 05:05:03 +0000
committers_nakamoto <s_nakamoto@1a98c847-1fd6-4fd8-948a-caf3550aa51b>2009-11-07 05:05:03 +0000
commit8b4cefd3245c349cad14baaf2ba42380dcc88112 (patch)
tree057c6725bb6df301d4a2b2793f14d562eb106bb0 /main.cpp
parent8acda009d921a65dab87bd0a40f63981a1586561 (diff)
UI tweaks, use BindListenPort to detect instance already running, setsockopt(SO_REUSEADDR) so can bind during TIME_WAIT after exit and restart
git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@35 1a98c847-1fd6-4fd8-948a-caf3550aa51b
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;