Skip to content

Commit 5905d71

Browse files
committed
Merge pull request #4170
ac14bcc small formatting, indentation and comment fixes (Philip Kaufmann)
2 parents d01574f + ac14bcc commit 5905d71

File tree

7 files changed

+21
-21
lines changed

7 files changed

+21
-21
lines changed

src/main.cpp

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1985,7 +1985,7 @@ bool static DisconnectTip(CValidationState &state) {
19851985
BOOST_FOREACH(const CTransaction &tx, block.vtx) {
19861986
// ignore validation errors in resurrected transactions
19871987
list<CTransaction> removed;
1988-
CValidationState stateDummy;
1988+
CValidationState stateDummy;
19891989
if (!tx.IsCoinBase())
19901990
if (!AcceptToMemoryPool(mempool, stateDummy, tx, false, NULL))
19911991
mempool.remove(tx, removed, true);
@@ -2213,7 +2213,6 @@ CBlockIndex* AddToBlockIndex(CBlockHeader& block)
22132213
return pindexNew;
22142214
}
22152215

2216-
22172216
// Mark a block as having its data received and checked (up to BLOCK_VALID_TRANSACTIONS).
22182217
bool ReceivedBlockTransactions(const CBlock &block, CValidationState& state, CBlockIndex *pindexNew, const CDiskBlockPos& pos)
22192218
{
@@ -2246,7 +2245,6 @@ bool ReceivedBlockTransactions(const CBlock &block, CValidationState& state, CBl
22462245
return true;
22472246
}
22482247

2249-
22502248
bool FindBlockPos(CValidationState &state, CDiskBlockPos &pos, unsigned int nAddSize, unsigned int nHeight, uint64_t nTime, bool fKnown = false)
22512249
{
22522250
bool fUpdatedLast = false;
@@ -2341,7 +2339,6 @@ bool FindUndoPos(CValidationState &state, int nFile, CDiskBlockPos &pos, unsigne
23412339
return true;
23422340
}
23432341

2344-
23452342
bool CheckBlockHeader(const CBlockHeader& block, CValidationState& state, bool fCheckPOW)
23462343
{
23472344
// Check proof of work matches claimed amount
@@ -4455,8 +4452,8 @@ bool SendMessages(CNode* pto, bool fSendTrickle)
44554452
// in flight for over two minutes, since we first had a chance to
44564453
// process an incoming block.
44574454
int64_t nNow = GetTimeMicros();
4458-
if (!pto->fDisconnect && state.nBlocksInFlight &&
4459-
state.nLastBlockReceive < state.nLastBlockProcess - BLOCK_DOWNLOAD_TIMEOUT*1000000 &&
4455+
if (!pto->fDisconnect && state.nBlocksInFlight &&
4456+
state.nLastBlockReceive < state.nLastBlockProcess - BLOCK_DOWNLOAD_TIMEOUT*1000000 &&
44604457
state.vBlocksInFlight.front().nTime < state.nLastBlockProcess - 2*BLOCK_DOWNLOAD_TIMEOUT*1000000) {
44614458
LogPrintf("Peer %s is stalling block download, disconnecting\n", state.name.c_str());
44624459
pto->fDisconnect = true;

src/main.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1013,7 +1013,6 @@ class CValidationState {
10131013
/** RAII wrapper for VerifyDB: Verify consistency of the block and coin databases */
10141014
class CVerifyDB {
10151015
public:
1016-
10171016
CVerifyDB();
10181017
~CVerifyDB();
10191018
bool VerifyDB(int nCheckLevel, int nCheckDepth);

src/miner.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -677,4 +677,3 @@ void GenerateBitcoins(bool fGenerate, CWallet* pwallet, int nThreads)
677677
}
678678

679679
#endif
680-

src/miner.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,12 @@
1010

1111
class CBlock;
1212
class CBlockIndex;
13-
struct CBlockTemplate;
1413
class CReserveKey;
1514
class CScript;
1615
class CWallet;
1716

17+
struct CBlockTemplate;
18+
1819
/** Run the miner threads */
1920
void GenerateBitcoins(bool fGenerate, CWallet* pwallet, int nThreads);
2021
/** Generate a new block, without valid proof-of-work */

src/rpcblockchain.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
// Distributed under the MIT/X11 software license, see the accompanying
44
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
55

6-
#include "rpcserver.h"
6+
#include "checkpoints.h"
77
#include "main.h"
8+
#include "rpcserver.h"
89
#include "sync.h"
9-
#include "checkpoints.h"
1010

1111
#include <stdint.h>
1212

src/rpcmining.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,11 @@
1313
#include "db.h"
1414
#include "wallet.h"
1515
#endif
16+
1617
#include <stdint.h>
1718

1819
#include <boost/assign/list_of.hpp>
20+
1921
#include "json/json_spirit_utils.h"
2022
#include "json/json_spirit_value.h"
2123

src/util.cpp

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -962,13 +962,15 @@ const boost::filesystem::path &GetDataDir(bool fNetSpecific)
962962
void ClearDatadirCache()
963963
{
964964
std::fill(&pathCached[0], &pathCached[CChainParams::MAX_NETWORK_TYPES+1],
965-
boost::filesystem::path());
965+
boost::filesystem::path());
966966
}
967967

968968
boost::filesystem::path GetConfigFile()
969969
{
970970
boost::filesystem::path pathConfigFile(GetArg("-conf", "bitcoin.conf"));
971-
if (!pathConfigFile.is_complete()) pathConfigFile = GetDataDir(false) / pathConfigFile;
971+
if (!pathConfigFile.is_complete())
972+
pathConfigFile = GetDataDir(false) / pathConfigFile;
973+
972974
return pathConfigFile;
973975
}
974976

@@ -1028,9 +1030,9 @@ bool RenameOver(boost::filesystem::path src, boost::filesystem::path dest)
10281030
#endif /* WIN32 */
10291031
}
10301032

1031-
1032-
// Ignores exceptions thrown by boost's create_directory if the requested directory exists.
1033-
// Specifically handles case where path p exists, but it wasn't possible for the user to write to the parent directory.
1033+
// Ignores exceptions thrown by Boost's create_directory if the requested directory exists.
1034+
// Specifically handles case where path p exists, but it wasn't possible for the user to
1035+
// write to the parent directory.
10341036
bool TryCreateDirectory(const boost::filesystem::path& p)
10351037
{
10361038
try
@@ -1381,19 +1383,19 @@ bool ParseInt32(const std::string& str, int32_t *out)
13811383

13821384
void SetupEnvironment()
13831385
{
1384-
#ifndef WIN32
1386+
#ifndef WIN32
13851387
try
13861388
{
1387-
#if BOOST_FILESYSTEM_VERSION == 3
1389+
#if BOOST_FILESYSTEM_VERSION == 3
13881390
boost::filesystem::path::codecvt(); // Raises runtime error if current locale is invalid
1389-
#else // boost filesystem v2
1391+
#else // boost filesystem v2
13901392
std::locale(); // Raises runtime error if current locale is invalid
1391-
#endif
1393+
#endif
13921394
} catch(std::runtime_error &e)
13931395
{
13941396
setenv("LC_ALL", "C", 1); // Force C locale
13951397
}
1396-
#endif
1398+
#endif
13971399
}
13981400

13991401
std::string DateTimeStrFormat(const char* pszFormat, int64_t nTime)

0 commit comments

Comments
 (0)