Browse Source

small formatting, indentation and comment fixes

- contains zero code changes
0.10
Philip Kaufmann 11 years ago
parent
commit
ac14bcc1f1
  1. 3
      src/main.cpp
  2. 1
      src/main.h
  3. 1
      src/miner.cpp
  4. 3
      src/miner.h
  5. 4
      src/rpcblockchain.cpp
  6. 2
      src/rpcmining.cpp
  7. 22
      src/util.cpp

3
src/main.cpp

@ -2213,7 +2213,6 @@ CBlockIndex* AddToBlockIndex(CBlockHeader& block)
return pindexNew; return pindexNew;
} }
// Mark a block as having its data received and checked (up to BLOCK_VALID_TRANSACTIONS). // 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) 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; return true;
} }
bool FindBlockPos(CValidationState &state, CDiskBlockPos &pos, unsigned int nAddSize, unsigned int nHeight, uint64_t nTime, bool fKnown = false) bool FindBlockPos(CValidationState &state, CDiskBlockPos &pos, unsigned int nAddSize, unsigned int nHeight, uint64_t nTime, bool fKnown = false)
{ {
bool fUpdatedLast = false; bool fUpdatedLast = false;
@ -2341,7 +2339,6 @@ bool FindUndoPos(CValidationState &state, int nFile, CDiskBlockPos &pos, unsigne
return true; return true;
} }
bool CheckBlockHeader(const CBlockHeader& block, CValidationState& state, bool fCheckPOW) bool CheckBlockHeader(const CBlockHeader& block, CValidationState& state, bool fCheckPOW)
{ {
// Check proof of work matches claimed amount // Check proof of work matches claimed amount

1
src/main.h

@ -1019,7 +1019,6 @@ public:
/** RAII wrapper for VerifyDB: Verify consistency of the block and coin databases */ /** RAII wrapper for VerifyDB: Verify consistency of the block and coin databases */
class CVerifyDB { class CVerifyDB {
public: public:
CVerifyDB(); CVerifyDB();
~CVerifyDB(); ~CVerifyDB();
bool VerifyDB(int nCheckLevel, int nCheckDepth); bool VerifyDB(int nCheckLevel, int nCheckDepth);

1
src/miner.cpp

@ -677,4 +677,3 @@ void GenerateBitcoins(bool fGenerate, CWallet* pwallet, int nThreads)
} }
#endif #endif

3
src/miner.h

@ -10,11 +10,12 @@
class CBlock; class CBlock;
class CBlockIndex; class CBlockIndex;
struct CBlockTemplate;
class CReserveKey; class CReserveKey;
class CScript; class CScript;
class CWallet; class CWallet;
struct CBlockTemplate;
/** Run the miner threads */ /** Run the miner threads */
void GenerateBitcoins(bool fGenerate, CWallet* pwallet, int nThreads); void GenerateBitcoins(bool fGenerate, CWallet* pwallet, int nThreads);
/** Generate a new block, without valid proof-of-work */ /** Generate a new block, without valid proof-of-work */

4
src/rpcblockchain.cpp

@ -3,10 +3,10 @@
// Distributed under the MIT/X11 software license, see the accompanying // Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php. // file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "rpcserver.h" #include "checkpoints.h"
#include "main.h" #include "main.h"
#include "rpcserver.h"
#include "sync.h" #include "sync.h"
#include "checkpoints.h"
#include <stdint.h> #include <stdint.h>

2
src/rpcmining.cpp

@ -13,9 +13,11 @@
#include "db.h" #include "db.h"
#include "wallet.h" #include "wallet.h"
#endif #endif
#include <stdint.h> #include <stdint.h>
#include <boost/assign/list_of.hpp> #include <boost/assign/list_of.hpp>
#include "json/json_spirit_utils.h" #include "json/json_spirit_utils.h"
#include "json/json_spirit_value.h" #include "json/json_spirit_value.h"

22
src/util.cpp

@ -962,13 +962,15 @@ const boost::filesystem::path &GetDataDir(bool fNetSpecific)
void ClearDatadirCache() void ClearDatadirCache()
{ {
std::fill(&pathCached[0], &pathCached[CChainParams::MAX_NETWORK_TYPES+1], std::fill(&pathCached[0], &pathCached[CChainParams::MAX_NETWORK_TYPES+1],
boost::filesystem::path()); boost::filesystem::path());
} }
boost::filesystem::path GetConfigFile() boost::filesystem::path GetConfigFile()
{ {
boost::filesystem::path pathConfigFile(GetArg("-conf", "bitcoin.conf")); 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; return pathConfigFile;
} }
@ -1028,9 +1030,9 @@ bool RenameOver(boost::filesystem::path src, boost::filesystem::path dest)
#endif /* WIN32 */ #endif /* WIN32 */
} }
// Ignores exceptions thrown by Boost's create_directory if the requested directory exists.
// 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
// Specifically handles case where path p exists, but it wasn't possible for the user to write to the parent directory. // write to the parent directory.
bool TryCreateDirectory(const boost::filesystem::path& p) bool TryCreateDirectory(const boost::filesystem::path& p)
{ {
try try
@ -1381,19 +1383,19 @@ bool ParseInt32(const std::string& str, int32_t *out)
void SetupEnvironment() void SetupEnvironment()
{ {
#ifndef WIN32 #ifndef WIN32
try try
{ {
#if BOOST_FILESYSTEM_VERSION == 3 #if BOOST_FILESYSTEM_VERSION == 3
boost::filesystem::path::codecvt(); // Raises runtime error if current locale is invalid 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 std::locale(); // Raises runtime error if current locale is invalid
#endif #endif
} catch(std::runtime_error &e) } catch(std::runtime_error &e)
{ {
setenv("LC_ALL", "C", 1); // Force C locale setenv("LC_ALL", "C", 1); // Force C locale
} }
#endif #endif
} }
std::string DateTimeStrFormat(const char* pszFormat, int64_t nTime) std::string DateTimeStrFormat(const char* pszFormat, int64_t nTime)

Loading…
Cancel
Save