diff options
author | Philip Kaufmann <phil.kaufmann@t-online.de> | 2013-11-11 16:20:39 +0100 |
---|---|---|
committer | Philip Kaufmann <phil.kaufmann@t-online.de> | 2013-11-11 16:20:39 +0100 |
commit | cd696e64dfe8821fe13d959dd2d1a2ee892f9155 (patch) | |
tree | 692872ff268cbfd53bf0670481ef02ed7afaadc0 | |
parent | a6aa179699aa4e885a7d93cd28a8af012cd5df2b (diff) |
misc small changes to polish after include cleanup
-rw-r--r-- | src/alert.cpp | 7 | ||||
-rw-r--r-- | src/bitcoind.cpp | 2 | ||||
-rw-r--r-- | src/main.cpp | 18 | ||||
-rw-r--r-- | src/net.h | 1 | ||||
-rw-r--r-- | src/rpcdump.cpp | 1 | ||||
-rw-r--r-- | src/rpcmining.cpp | 2 | ||||
-rw-r--r-- | src/util.h | 4 |
7 files changed, 14 insertions, 21 deletions
diff --git a/src/alert.cpp b/src/alert.cpp index 7f7e59ee10..7c9e54ef8b 100644 --- a/src/alert.cpp +++ b/src/alert.cpp @@ -1,6 +1,7 @@ -// -// Alert system -// +// Copyright (c) 2010 Satoshi Nakamoto +// Copyright (c) 2009-2013 The Bitcoin developers +// Distributed under the MIT/X11 software license, see the accompanying +// file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "alert.h" diff --git a/src/bitcoind.cpp b/src/bitcoind.cpp index c1b26812b5..f0aad4f33a 100644 --- a/src/bitcoind.cpp +++ b/src/bitcoind.cpp @@ -3,8 +3,6 @@ // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. - - #include "bitcoinrpc.h" #include "init.h" #include "main.h" diff --git a/src/main.cpp b/src/main.cpp index 8aef91d829..72245137ed 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -3039,7 +3039,7 @@ void static ProcessGetData(CNode* pfrom) // Track requests for our stuff. g_signals.Inventory(inv.hash); - + if (inv.type == MSG_BLOCK || inv.type == MSG_FILTERED_BLOCK) break; } @@ -3576,10 +3576,10 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv) size_t nAvail = vRecv.in_avail(); bool bPingFinished = false; std::string sProblem; - + if (nAvail >= sizeof(nonce)) { vRecv >> nonce; - + // Only process pong message if there is an outstanding ping (old ping without nonce should never pong) if (pfrom->nPingNonceSent != 0) { if (nonce == pfrom->nPingNonceSent) { @@ -3610,7 +3610,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv) bPingFinished = true; sProblem = "Short payload"; } - + if (!(sProblem.empty())) { LogPrint("net", "pong %s %s: %s, %"PRIx64" expected, %"PRIx64" received, %"PRIszu" bytes\n", pfrom->addr.ToString().c_str(), @@ -3624,8 +3624,8 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv) pfrom->nPingNonceSent = 0; } } - - + + else if (strCommand == "alert") { CAlert alert; @@ -3761,10 +3761,10 @@ bool ProcessMessages(CNode* pfrom) if (!pfrom->vRecvGetData.empty()) ProcessGetData(pfrom); - + // this maintains the order of responses if (!pfrom->vRecvGetData.empty()) return fOk; - + std::deque<CNetMessage>::iterator it = pfrom->vRecvMsg.begin(); while (!pfrom->fDisconnect && it != pfrom->vRecvMsg.end()) { // Don't bother if send buffer is too full to respond anyway @@ -3853,7 +3853,7 @@ bool ProcessMessages(CNode* pfrom) if (!fRet) LogPrintf("ProcessMessage(%s, %u bytes) FAILED\n", strCommand.c_str(), nMessageSize); - + break; } @@ -25,7 +25,6 @@ #include <arpa/inet.h> #endif -//#include <boost/array.hpp> #include <boost/foreach.hpp> #include <boost/signals2/signal.hpp> #include <openssl/rand.h> diff --git a/src/rpcdump.cpp b/src/rpcdump.cpp index 68d412490b..fe2f4b93b9 100644 --- a/src/rpcdump.cpp +++ b/src/rpcdump.cpp @@ -130,7 +130,6 @@ Value importwallet(const Array& params, bool fHelp) int64_t nTimeBegin = chainActive.Tip()->nTime; - bool fGood = true; while (file.good()) { diff --git a/src/rpcmining.cpp b/src/rpcmining.cpp index 5fe464da81..f34178fff8 100644 --- a/src/rpcmining.cpp +++ b/src/rpcmining.cpp @@ -3,8 +3,6 @@ // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. - - #include "bitcoinrpc.h" #include "chainparams.h" #include "db.h" diff --git a/src/util.h b/src/util.h index 7fae5cc7ec..d3687620dc 100644 --- a/src/util.h +++ b/src/util.h @@ -27,8 +27,6 @@ #include <sys/resource.h> #include <sys/time.h> #include <sys/types.h> -#else -typedef int pid_t; /* define for Windows compatibility */ #endif #include <boost/filesystem/path.hpp> @@ -109,7 +107,7 @@ inline void MilliSleep(int64_t n) #elif defined(HAVE_WORKING_BOOST_SLEEP) boost::this_thread::sleep(boost::posix_time::milliseconds(n)); #else - //should never get here +//should never get here #error missing boost sleep implementation #endif } |