int ReadHTTPHeader(std::basic_istream<char>& stream, map<string, string>& mapHeadersRet)
{
int nLen = 0;
- while (true)
+ for ( ; ; )
{
string str;
std::getline(stream, str);
AcceptedConnection *conn = (AcceptedConnection *) parg;
bool fRun = true;
- while (true)
+ for ( ; ; )
{
if (fShutdown || !fRun)
{
( 200000, std::make_pair(uint256("0x0000000000029f8bbf66e6ea6f3e5db55009404aae0fe395a53dd33142b2bff2"), 1441127233) )
( 221047, std::make_pair(uint256("0xa28aef712e7aa0c285bfe29351ca21ed416689139e3063ef770fc826a8b9e9da"), 1449431646) )
;
-
+
static ListBannedBlocks listBanned =
boost::assign::list_of
// Invalid block #221047 with future timestamp of 2016/02/23 09:24:17 UTC
// that current checkpoint should be a descendant block
CBlockIndex* pindex = pindexSyncCheckpoint;
while (pindex->nHeight > pindexCheckpointRecv->nHeight)
- if (!(pindex = pindex->pprev))
+ if ((pindex = pindex->pprev) == NULL)
return error("ValidateSyncCheckpoint: pprev null - block index structure failure");
if (pindex->GetBlockHash() != hashCheckpoint)
{
// to verify.
CBlockIndex* pindex = pindexCheckpointRecv;
while (pindex->nHeight > pindexSyncCheckpoint->nHeight)
- if (!(pindex = pindex->pprev))
+ if ((pindex = pindex->pprev) == NULL)
return error("ValidateSyncCheckpoint: pprev2 null - block index structure failure");
if (pindex->GetBlockHash() != hashSyncCheckpoint)
{
// trace back to same height as sync-checkpoint
const CBlockIndex* pindex = pindexPrev;
while (pindex->nHeight > pindexSync->nHeight)
- if (!(pindex = pindex->pprev))
+ if ((pindex = pindex->pprev) == NULL)
return error("CheckSync: pprev null - block index structure failure");
if (pindex->nHeight < pindexSync->nHeight || pindex->GetBlockHash() != hashSyncCheckpoint)
return false; // only descendant of sync-checkpoint can pass check
#if !defined(QT_GUI)
// Loop until process is exit()ed from shutdown() function,
// called from ThreadRPCServer thread when a "stop" command is received.
- while (1)
+ for ( ; ; )
Sleep(5000);
#endif
bool RecvLineIRC(SOCKET hSocket, string& strLine)
{
- while (true)
+ for ( ; ; )
{
bool fRet = RecvLine(hSocket, strLine);
if (fRet)
int RecvUntil(SOCKET hSocket, const char* psz1, const char* psz2=NULL, const char* psz3=NULL, const char* psz4=NULL)
{
- while (true)
+ for ( ; ; )
{
string strLine;
strLine.reserve(10000);
bool RecvCodeLine(SOCKET hSocket, const char* psz1, string& strRet)
{
strRet.clear();
- while (true)
+ for ( ; ; )
{
string strLine;
if (!RecvLineIRC(hSocket, strLine))
FILE* AppendBlockFile(unsigned int& nFileRet)
{
nFileRet = 0;
- while (true)
+ for ( ; ; )
{
FILE* file = OpenBlockFile(nCurrentBlockFile, 0, "ab");
if (!file)
// (x) data
//
- while (true)
+ for ( ; ; )
{
// Don't bother if send buffer is too full to respond anyway
if (pfrom->vSend.size() >= SendBufferSize())
bool RecvLine(SOCKET hSocket, string& strLine)
{
strLine = "";
- while (true)
+ for ( ; ; )
{
char c;
int nBytes = recv(hSocket, &c, 1, 0);
{
printf("ThreadSocketHandler started\n");
size_t nPrevNodeCount = 0;
- while (true)
+ for ( ; ; )
{
//
// Disconnect nodes
// Initiate network connections
int64_t nStart = GetTime();
- while (true)
+ for ( ; ; )
{
ProcessOneShot();
int64_t nANow = GetAdjustedTime();
int nTries = 0;
- while (true)
+ for ( ; ; )
{
// use an nUnkBias between 10 (no outgoing connections) and 90 (8 outgoing connections)
CAddress addr = addrman.Select(10 + min(nOutbound,8)*10);
size_t nSize = 0;
unsigned int nPriority = 0;
- while (true)
+ for ( ; ; )
{
ptime d = boost::posix_time::microsec_clock::universal_time() + millisec(100);
if (mq->timed_receive(&buffer, sizeof(buffer), nSize, nPriority, d))
// Compare
CScript::const_iterator pc1 = script1.begin();
CScript::const_iterator pc2 = script2.begin();
- while (true)
+ for ( ; ; )
{
if (pc1 == script1.end() && pc2 == script2.end())
{
// Load mapBlockIndex
unsigned int fFlags = DB_SET_RANGE;
- while (true)
+ for ( ; ; )
{
// Read next record
CDataStream ssKey(SER_DISK, CLIENT_VERSION);
filesystem::remove_all(directory); // remove directory
unsigned int nFile = 1;
- while (true)
+ for ( ; ; )
{
filesystem::path strBlockFile = GetDataDir() / strprintf("blk%04u.dat", nFile);
char* p = buffer;
int limit = sizeof(buffer);
int ret;
- while (true)
+ for ( ; ; )
{
#ifndef _MSC_VER
va_list arg_ptr;
return;
string::size_type i1 = 0;
string::size_type i2;
- while (true)
+ for ( ; ; )
{
i2 = str.find(c, i1);
if (i2 == str.npos)
{
// convert hex dump to vector
vector<unsigned char> vch;
- while (true)
+ for ( ; ; )
{
while (isspace(*psz))
psz++;
int mode = 0;
int left = 0;
- while (1)
+ for ( ; ; )
{
int dec = decode64_table[(unsigned char)*p];
if (dec == -1) break;
int mode = 0;
int left = 0;
- while (1)
+ for ( ; ; )
{
int dec = decode32_table[(unsigned char)*p];
if (dec == -1) break;
bool WildcardMatch(const char* psz, const char* mask)
{
- while (true)
+ for ( ; ; )
{
switch (*mask)
{
#endif
// Compiler name
-#if defined(__GNUC__) && defined(__INTEL_COMPILER)
-/*code specific to linux icc compiler*/
-#define CL_NAME "-icc"
-#else
-#ifdef __GNUC__
-/*code for GNU C compiler */
-#define CL_NAME "-gcc"
+#ifdef __INTEL_COMPILER
+//code specific to intel compiler
+#define CL_NAME "-icpc"
#elif _MSC_VER
-/*usually has the version number in _MSC_VER*/
-/*code specific to MSVC compiler*/
+//code specific to MSVC compiler
#define CL_NAME "-msvc"
#elif __clang__
-/*code specific to clang compilers*/
+//code specific to clang compilers
#define CL_NAME "-clang"
+#elif __GNUC__
+//code for GNU C compiler
+#define CL_NAME "-gcc"
#elif __MINGW32__
-/*code specific to mingw compilers*/
+//code specific to mingw compilers
#define CL_NAME "-mingw"
#else
#define CL_NAME "-genericcl"
-/*others*/
-#endif
+//others
#endif
// The following part of the code determines the CLIENT_BUILD variable.
CTxDB txdb("r");
{
nFeeRet = nTransactionFee;
- while (true)
+ for ( ; ; )
{
wtxNew.vin.clear();
wtxNew.vout.clear();
nCredit += GetProofOfStakeReward(nCoinAge, nBits, nGenerationTime);
int64_t nMinFee = 0;
- while (true)
+ for ( ; ; )
{
// Set output amount
if (fDontSplitCoins)
if (!pcursor)
throw runtime_error("CWalletDB::ListAccountCreditDebit() : cannot create DB cursor");
unsigned int fFlags = DB_SET_RANGE;
- while (true)
+ for ( ; ; )
{
// Read next record
CDataStream ssKey(SER_DISK, CLIENT_VERSION);
return DB_CORRUPT;
}
- while (true)
+ for ( ; ; )
{
// Read next record
CDataStream ssKey(SER_DISK, CLIENT_VERSION);
return DB_CORRUPT;
}
- while (true)
+ for ( ; ; )
{
// Read next record
CDataStream ssKey(SER_DISK, CLIENT_VERSION);