diff --git a/src/Makefile.am b/src/Makefile.am index b2071f49e2..94a582dfac 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -98,12 +98,11 @@ BITCOIN_CORE_H = \ rpcclient.h \ rpcprotocol.h \ rpcserver.h \ - script/interpreter.h \ script/compressor.h \ + script/interpreter.h \ script/script.h \ script/sign.h \ script/standard.h \ - wallet_ismine.h \ serialize.h \ sync.h \ threadsafety.h \ @@ -118,8 +117,9 @@ BITCOIN_CORE_H = \ utilmoneystr.h \ utiltime.h \ version.h \ - walletdb.h \ wallet.h \ + wallet_ismine.h \ + walletdb.h \ compat/sanity.h JSON_H = \ @@ -173,8 +173,8 @@ libbitcoin_wallet_a_SOURCES = \ crypter.cpp \ rpcdump.cpp \ rpcwallet.cpp \ - wallet_ismine.cpp \ wallet.cpp \ + wallet_ismine.cpp \ walletdb.cpp \ $(BITCOIN_CORE_H) @@ -212,8 +212,8 @@ libbitcoin_common_a_SOURCES = \ keystore.cpp \ netbase.cpp \ protocol.cpp \ - script/interpreter.cpp \ script/compressor.cpp \ + script/interpreter.cpp \ script/script.cpp \ script/sign.cpp \ script/standard.cpp \ diff --git a/src/allocators.h b/src/allocators.h index 0b1c9fea68..65a7d08987 100644 --- a/src/allocators.h +++ b/src/allocators.h @@ -12,6 +12,7 @@ #include #include + #include // for OPENSSL_cleanse() /** diff --git a/src/bitcoin-cli.cpp b/src/bitcoin-cli.cpp index 871aaf93df..badb376cb3 100644 --- a/src/bitcoin-cli.cpp +++ b/src/bitcoin-cli.cpp @@ -3,11 +3,11 @@ // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. -#include "util.h" +#include "chainparamsbase.h" #include "init.h" #include "rpcclient.h" #include "rpcprotocol.h" -#include "chainparamsbase.h" +#include "util.h" #include "utilstrencodings.h" #include "version.h" diff --git a/src/bitcoin-tx.cpp b/src/bitcoin-tx.cpp index 91525b51c9..2cc4fda9df 100644 --- a/src/bitcoin-tx.cpp +++ b/src/bitcoin-tx.cpp @@ -3,23 +3,24 @@ // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "base58.h" -#include "util.h" -#include "utilmoneystr.h" #include "core.h" -#include "main.h" // for MAX_BLOCK_SIZE +#include "core_io.h" #include "keystore.h" +#include "main.h" // for MAX_BLOCK_SIZE #include "script/script.h" #include "script/sign.h" #include "ui_interface.h" // for _(...) #include "univalue/univalue.h" -#include "core_io.h" +#include "util.h" +#include "utilmoneystr.h" #include -#include -#include -using namespace std; +#include +#include + using namespace boost::assign; +using namespace std; static bool fCreateBlank; static map registers; diff --git a/src/chainparamsbase.h b/src/chainparamsbase.h index 2d3a07b44a..743c8c541a 100644 --- a/src/chainparamsbase.h +++ b/src/chainparamsbase.h @@ -5,8 +5,8 @@ #ifndef BITCOIN_CHAIN_PARAMS_BASE_H #define BITCOIN_CHAIN_PARAMS_BASE_H -#include #include +#include /** * CBaseChainParams defines the base parameters (shared between bitcoin-cli and bitcoind) diff --git a/src/core_io.h b/src/core_io.h index adf74cce32..6268a3bf58 100644 --- a/src/core_io.h +++ b/src/core_io.h @@ -8,9 +8,9 @@ #include #include -class uint256; class CScript; class CTransaction; +class uint256; class UniValue; // core_read.cpp diff --git a/src/core_read.cpp b/src/core_read.cpp index efcecb106f..11ec72f243 100644 --- a/src/core_read.cpp +++ b/src/core_read.cpp @@ -3,21 +3,22 @@ // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "core_io.h" + #include "core.h" -#include "serialize.h" #include "script/script.h" +#include "serialize.h" +#include "univalue/univalue.h" #include "util.h" -#include #include #include -#include #include -#include "univalue/univalue.h" +#include +#include -using namespace std; using namespace boost; using namespace boost::algorithm; +using namespace std; CScript ParseScript(std::string s) { diff --git a/src/core_write.cpp b/src/core_write.cpp index 62712b1ba0..cd64aabf63 100644 --- a/src/core_write.cpp +++ b/src/core_write.cpp @@ -3,14 +3,15 @@ // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "core_io.h" -#include "univalue/univalue.h" + +#include "base58.h" +#include "core.h" #include "script/script.h" #include "script/standard.h" -#include "core.h" #include "serialize.h" +#include "univalue/univalue.h" #include "util.h" #include "utilmoneystr.h" -#include "base58.h" #include diff --git a/src/crypto/ripemd160.cpp b/src/crypto/ripemd160.cpp index 24bd318d43..b5e9f0df49 100644 --- a/src/crypto/ripemd160.cpp +++ b/src/crypto/ripemd160.cpp @@ -5,6 +5,7 @@ #include "crypto/ripemd160.h" #include "crypto/common.h" + #include // Internal implementation code. diff --git a/src/crypto/sha1.cpp b/src/crypto/sha1.cpp index 304401a50f..819abab579 100644 --- a/src/crypto/sha1.cpp +++ b/src/crypto/sha1.cpp @@ -5,6 +5,7 @@ #include "crypto/sha1.h" #include "crypto/common.h" + #include // Internal implementation code. diff --git a/src/crypto/sha2.cpp b/src/crypto/sha2.cpp index 99a251cb12..72f191afcd 100644 --- a/src/crypto/sha2.cpp +++ b/src/crypto/sha2.cpp @@ -5,6 +5,7 @@ #include "crypto/sha2.h" #include "crypto/common.h" + #include // Internal implementation code. diff --git a/src/db.cpp b/src/db.cpp index 23d2cc988d..419b71e30d 100644 --- a/src/db.cpp +++ b/src/db.cpp @@ -20,6 +20,7 @@ #include #include #include + #include using namespace std; diff --git a/src/db.h b/src/db.h index bba267b84f..d1df950548 100644 --- a/src/db.h +++ b/src/db.h @@ -15,12 +15,14 @@ #include #include + #include -struct CBlockLocator; class CDiskBlockIndex; class COutPoint; +struct CBlockLocator; + extern unsigned int nWalletDBUpdated; void ThreadFlushWalletDB(const std::string& strWalletFile); diff --git a/src/hash.h b/src/hash.h index 98a2d1fb11..bdcd4afb47 100644 --- a/src/hash.h +++ b/src/hash.h @@ -6,8 +6,8 @@ #ifndef BITCOIN_HASH_H #define BITCOIN_HASH_H -#include "crypto/sha2.h" #include "crypto/ripemd160.h" +#include "crypto/sha2.h" #include "serialize.h" #include "uint256.h" #include "version.h" diff --git a/src/init.cpp b/src/init.cpp index 6e47536d38..a3f75d61df 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -11,6 +11,7 @@ #include "addrman.h" #include "checkpoints.h" +#include "compat/sanity.h" #include "key.h" #include "main.h" #include "miner.h" @@ -32,7 +33,6 @@ #ifndef WIN32 #include #endif -#include "compat/sanity.h" #include #include diff --git a/src/leveldbwrapper.h b/src/leveldbwrapper.h index 452df92839..e2a4f286b2 100644 --- a/src/leveldbwrapper.h +++ b/src/leveldbwrapper.h @@ -10,6 +10,7 @@ #include "version.h" #include + #include #include diff --git a/src/net.cpp b/src/net.cpp index b18944a264..891772cf62 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -48,8 +48,8 @@ #endif #endif -using namespace std; using namespace boost; +using namespace std; namespace { const int MAX_OUTBOUND_CONNECTIONS = 8; diff --git a/src/pow.h b/src/pow.h index 2a0d9b24bb..5d91108ac4 100644 --- a/src/pow.h +++ b/src/pow.h @@ -8,8 +8,8 @@ #include -class CBlockIndex; class CBlockHeader; +class CBlockIndex; class uint256; unsigned int GetNextWorkRequired(const CBlockIndex* pindexLast, const CBlockHeader *pblock); diff --git a/src/random.cpp b/src/random.cpp index 22c942acc0..fb5258a442 100644 --- a/src/random.cpp +++ b/src/random.cpp @@ -12,10 +12,12 @@ #include "util.h" // for LogPrint() #include "utilstrencodings.h" // for GetTime() +#include + #ifndef WIN32 #include #endif -#include + #include #include #include diff --git a/src/rpcclient.cpp b/src/rpcclient.cpp index a0921453cc..81797248b4 100644 --- a/src/rpcclient.cpp +++ b/src/rpcclient.cpp @@ -3,7 +3,6 @@ // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. -#include #include "rpcclient.h" #include "rpcprotocol.h" @@ -11,6 +10,7 @@ #include "ui_interface.h" #include "chainparams.h" // for Params().RPCPort() +#include #include using namespace std; diff --git a/src/rpcdump.cpp b/src/rpcdump.cpp index c286626fd3..dc73161bf1 100644 --- a/src/rpcdump.cpp +++ b/src/rpcdump.cpp @@ -7,8 +7,8 @@ #include "init.h" #include "main.h" #include "sync.h" -#include "utiltime.h" #include "util.h" +#include "utiltime.h" #include "wallet.h" #include @@ -16,6 +16,7 @@ #include #include + #include "json/json_spirit_value.h" using namespace json_spirit; diff --git a/src/rpcmining.cpp b/src/rpcmining.cpp index e4a5bc4162..4c80a91e1b 100644 --- a/src/rpcmining.cpp +++ b/src/rpcmining.cpp @@ -3,14 +3,14 @@ // 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 "chainparams.h" +#include "core_io.h" #include "init.h" #include "net.h" #include "main.h" #include "miner.h" #include "pow.h" -#include "core_io.h" +#include "rpcserver.h" #include "util.h" #ifdef ENABLE_WALLET #include "db.h" diff --git a/src/rpcnet.cpp b/src/rpcnet.cpp index 2baa481c4e..4afbe442ee 100644 --- a/src/rpcnet.cpp +++ b/src/rpcnet.cpp @@ -13,6 +13,7 @@ #include "util.h" #include + #include "json/json_spirit_value.h" using namespace json_spirit; diff --git a/src/rpcprotocol.cpp b/src/rpcprotocol.cpp index 808b9bbd2a..c99d113bc3 100644 --- a/src/rpcprotocol.cpp +++ b/src/rpcprotocol.cpp @@ -5,8 +5,8 @@ #include "rpcprotocol.h" -#include "util.h" #include "tinyformat.h" +#include "util.h" #include "utilstrencodings.h" #include "utiltime.h" #include "version.h" diff --git a/src/rpcrawtransaction.cpp b/src/rpcrawtransaction.cpp index c5c99870fc..3c89be078d 100644 --- a/src/rpcrawtransaction.cpp +++ b/src/rpcrawtransaction.cpp @@ -12,8 +12,8 @@ #include "net.h" #include "rpcserver.h" #include "script/script.h" -#include "script/standard.h" #include "script/sign.h" +#include "script/standard.h" #include "uint256.h" #ifdef ENABLE_WALLET #include "wallet.h" @@ -25,10 +25,10 @@ #include "json/json_spirit_utils.h" #include "json/json_spirit_value.h" -using namespace std; using namespace boost; using namespace boost::assign; using namespace json_spirit; +using namespace std; void ScriptPubKeyToJSON(const CScript& scriptPubKey, Object& out, bool fIncludeHex) { diff --git a/src/serialize.h b/src/serialize.h index dba3460d1b..57f5fd069b 100644 --- a/src/serialize.h +++ b/src/serialize.h @@ -10,8 +10,8 @@ #include #include -#include #include +#include #include #include #include diff --git a/src/sync.cpp b/src/sync.cpp index 066c1ca744..d424f7bc95 100644 --- a/src/sync.cpp +++ b/src/sync.cpp @@ -7,9 +7,10 @@ #include "util.h" #include "utilstrencodings.h" +#include + #include #include -#include #ifdef DEBUG_LOCKCONTENTION void PrintLockContention(const char* pszName, const char* pszFile, int nLine) diff --git a/src/timedata.h b/src/timedata.h index 9cc47bec13..155f6872da 100644 --- a/src/timedata.h +++ b/src/timedata.h @@ -5,10 +5,10 @@ #ifndef BITCOIN_TIMEDATA_H #define BITCOIN_TIMEDATA_H -#include -#include #include #include +#include +#include class CNetAddr; diff --git a/src/txdb.cpp b/src/txdb.cpp index d4c6007558..79838b6116 100644 --- a/src/txdb.cpp +++ b/src/txdb.cpp @@ -9,9 +9,10 @@ #include "pow.h" #include "uint256.h" -#include #include +#include + using namespace std; void static BatchWriteCoins(CLevelDBBatch &batch, const uint256 &hash, const CCoins &coins) { diff --git a/src/txmempool.cpp b/src/txmempool.cpp index 6bbadc8345..50e6fed2ad 100644 --- a/src/txmempool.cpp +++ b/src/txmempool.cpp @@ -3,8 +3,9 @@ // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. -#include "core.h" #include "txmempool.h" + +#include "core.h" #include "util.h" #include @@ -644,4 +645,3 @@ bool CCoinsViewMemPool::GetCoins(const uint256 &txid, CCoins &coins) const { bool CCoinsViewMemPool::HaveCoins(const uint256 &txid) const { return mempool.exists(txid) || base->HaveCoins(txid); } - diff --git a/src/uint256.h b/src/uint256.h index 6bb9a59400..28de540226 100644 --- a/src/uint256.h +++ b/src/uint256.h @@ -7,10 +7,10 @@ #define BITCOIN_UINT256_H #include +#include #include #include #include -#include #include class uint_error : public std::runtime_error { diff --git a/src/util.h b/src/util.h index 6e1f439ff7..e72c99adc7 100644 --- a/src/util.h +++ b/src/util.h @@ -15,8 +15,8 @@ #endif #include "compat.h" -#include "utiltime.h" #include "tinyformat.h" +#include "utiltime.h" #include #include diff --git a/src/utilstrencodings.cpp b/src/utilstrencodings.cpp index ef13555104..6837e4e267 100644 --- a/src/utilstrencodings.cpp +++ b/src/utilstrencodings.cpp @@ -7,10 +7,11 @@ #include "tinyformat.h" -#include #include #include +#include + using namespace std; // safeChars chosen to allow simple messages/URLs/email addresses, but avoid anything diff --git a/src/version.cpp b/src/version.cpp index 8311041ed2..e441cc463f 100644 --- a/src/version.cpp +++ b/src/version.cpp @@ -7,6 +7,7 @@ #include "tinyformat.h" #include + #include // Name of client reported in the 'version' message. Report the same name diff --git a/src/wallet.h b/src/wallet.h index 5c26186730..3461446b8b 100644 --- a/src/wallet.h +++ b/src/wallet.h @@ -11,8 +11,8 @@ #include "key.h" #include "keystore.h" #include "main.h" -#include "wallet_ismine.h" #include "ui_interface.h" +#include "wallet_ismine.h" #include "walletdb.h" #include diff --git a/src/walletdb.cpp b/src/walletdb.cpp index 48045b98c8..03161250db 100644 --- a/src/walletdb.cpp +++ b/src/walletdb.cpp @@ -9,8 +9,8 @@ #include "protocol.h" #include "serialize.h" #include "sync.h" -#include "utiltime.h" #include "util.h" +#include "utiltime.h" #include "wallet.h" #include