aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Kaufmann <phil.kaufmann@t-online.de>2014-05-10 14:54:20 +0200
committerPhilip Kaufmann <phil.kaufmann@t-online.de>2014-06-10 18:23:56 +0200
commitac14bcc1f12d2407516bcdfef57b2740df48381b (patch)
tree1f9164b9aea8f3e4740886d9cfbe2047299307a2
parent3d7399cb171c2468b81a9179cb04358c56b4c7c4 (diff)
small formatting, indentation and comment fixes
- contains zero code changes
-rw-r--r--src/main.cpp9
-rw-r--r--src/main.h1
-rw-r--r--src/miner.cpp1
-rw-r--r--src/miner.h3
-rw-r--r--src/rpcblockchain.cpp4
-rw-r--r--src/rpcmining.cpp2
-rw-r--r--src/util.cpp22
7 files changed, 21 insertions, 21 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 5d1ff94f5d..f53d20fbb4 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1985,7 +1985,7 @@ bool static DisconnectTip(CValidationState &state) {
BOOST_FOREACH(const CTransaction &tx, block.vtx) {
// ignore validation errors in resurrected transactions
list<CTransaction> removed;
- CValidationState stateDummy;
+ CValidationState stateDummy;
if (!tx.IsCoinBase())
if (!AcceptToMemoryPool(mempool, stateDummy, tx, false, NULL))
mempool.remove(tx, removed, true);
@@ -2213,7 +2213,6 @@ CBlockIndex* AddToBlockIndex(CBlockHeader& block)
return pindexNew;
}
-
// Mark a block as having its data received and checked (up to BLOCK_VALID_TRANSACTIONS).
bool ReceivedBlockTransactions(const CBlock &block, CValidationState& state, CBlockIndex *pindexNew, const CDiskBlockPos& pos)
{
@@ -2246,7 +2245,6 @@ bool ReceivedBlockTransactions(const CBlock &block, CValidationState& state, CBl
return true;
}
-
bool FindBlockPos(CValidationState &state, CDiskBlockPos &pos, unsigned int nAddSize, unsigned int nHeight, uint64_t nTime, bool fKnown = false)
{
bool fUpdatedLast = false;
@@ -2341,7 +2339,6 @@ bool FindUndoPos(CValidationState &state, int nFile, CDiskBlockPos &pos, unsigne
return true;
}
-
bool CheckBlockHeader(const CBlockHeader& block, CValidationState& state, bool fCheckPOW)
{
// Check proof of work matches claimed amount
@@ -4455,8 +4452,8 @@ bool SendMessages(CNode* pto, bool fSendTrickle)
// in flight for over two minutes, since we first had a chance to
// process an incoming block.
int64_t nNow = GetTimeMicros();
- if (!pto->fDisconnect && state.nBlocksInFlight &&
- state.nLastBlockReceive < state.nLastBlockProcess - BLOCK_DOWNLOAD_TIMEOUT*1000000 &&
+ if (!pto->fDisconnect && state.nBlocksInFlight &&
+ state.nLastBlockReceive < state.nLastBlockProcess - BLOCK_DOWNLOAD_TIMEOUT*1000000 &&
state.vBlocksInFlight.front().nTime < state.nLastBlockProcess - 2*BLOCK_DOWNLOAD_TIMEOUT*1000000) {
LogPrintf("Peer %s is stalling block download, disconnecting\n", state.name.c_str());
pto->fDisconnect = true;
diff --git a/src/main.h b/src/main.h
index 4ef3800084..e0cbbd25c3 100644
--- a/src/main.h
+++ b/src/main.h
@@ -1019,7 +1019,6 @@ public:
/** RAII wrapper for VerifyDB: Verify consistency of the block and coin databases */
class CVerifyDB {
public:
-
CVerifyDB();
~CVerifyDB();
bool VerifyDB(int nCheckLevel, int nCheckDepth);
diff --git a/src/miner.cpp b/src/miner.cpp
index 68abc4a6ef..a0a728fb81 100644
--- a/src/miner.cpp
+++ b/src/miner.cpp
@@ -677,4 +677,3 @@ void GenerateBitcoins(bool fGenerate, CWallet* pwallet, int nThreads)
}
#endif
-
diff --git a/src/miner.h b/src/miner.h
index 26151f6cd5..dcd61d8fd9 100644
--- a/src/miner.h
+++ b/src/miner.h
@@ -10,11 +10,12 @@
class CBlock;
class CBlockIndex;
-struct CBlockTemplate;
class CReserveKey;
class CScript;
class CWallet;
+struct CBlockTemplate;
+
/** Run the miner threads */
void GenerateBitcoins(bool fGenerate, CWallet* pwallet, int nThreads);
/** Generate a new block, without valid proof-of-work */
diff --git a/src/rpcblockchain.cpp b/src/rpcblockchain.cpp
index ff5057b526..5e0173dcf2 100644
--- a/src/rpcblockchain.cpp
+++ b/src/rpcblockchain.cpp
@@ -3,10 +3,10 @@
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
-#include "rpcserver.h"
+#include "checkpoints.h"
#include "main.h"
+#include "rpcserver.h"
#include "sync.h"
-#include "checkpoints.h"
#include <stdint.h>
diff --git a/src/rpcmining.cpp b/src/rpcmining.cpp
index 837f5336c4..3caf7d89fe 100644
--- a/src/rpcmining.cpp
+++ b/src/rpcmining.cpp
@@ -13,9 +13,11 @@
#include "db.h"
#include "wallet.h"
#endif
+
#include <stdint.h>
#include <boost/assign/list_of.hpp>
+
#include "json/json_spirit_utils.h"
#include "json/json_spirit_value.h"
diff --git a/src/util.cpp b/src/util.cpp
index d106b03230..cccf2df484 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -962,13 +962,15 @@ const boost::filesystem::path &GetDataDir(bool fNetSpecific)
void ClearDatadirCache()
{
std::fill(&pathCached[0], &pathCached[CChainParams::MAX_NETWORK_TYPES+1],
- boost::filesystem::path());
+ boost::filesystem::path());
}
boost::filesystem::path GetConfigFile()
{
boost::filesystem::path pathConfigFile(GetArg("-conf", "bitcoin.conf"));
- if (!pathConfigFile.is_complete()) pathConfigFile = GetDataDir(false) / pathConfigFile;
+ if (!pathConfigFile.is_complete())
+ pathConfigFile = GetDataDir(false) / pathConfigFile;
+
return pathConfigFile;
}
@@ -1028,9 +1030,9 @@ bool RenameOver(boost::filesystem::path src, boost::filesystem::path dest)
#endif /* WIN32 */
}
-
-// Ignores exceptions thrown by boost's create_directory if the requested directory exists.
-// Specifically handles case where path p exists, but it wasn't possible for the user to write to the parent directory.
+// Ignores exceptions thrown by Boost's create_directory if the requested directory exists.
+// Specifically handles case where path p exists, but it wasn't possible for the user to
+// write to the parent directory.
bool TryCreateDirectory(const boost::filesystem::path& p)
{
try
@@ -1381,19 +1383,19 @@ bool ParseInt32(const std::string& str, int32_t *out)
void SetupEnvironment()
{
- #ifndef WIN32
+#ifndef WIN32
try
{
- #if BOOST_FILESYSTEM_VERSION == 3
+#if BOOST_FILESYSTEM_VERSION == 3
boost::filesystem::path::codecvt(); // Raises runtime error if current locale is invalid
- #else // boost filesystem v2
+#else // boost filesystem v2
std::locale(); // Raises runtime error if current locale is invalid
- #endif
+#endif
} catch(std::runtime_error &e)
{
setenv("LC_ALL", "C", 1); // Force C locale
}
- #endif
+#endif
}
std::string DateTimeStrFormat(const char* pszFormat, int64_t nTime)