mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 06:28:31 +01:00
UI tweaks, use BindListenPort to detect instance already running, setsockopt(SO_REUSEADDR) so can bind during TIME_WAIT after exit and restart
This commit is contained in:
8
main.cpp
8
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;
|
||||
|
||||
Reference in New Issue
Block a user