Skip to content

Commit

Permalink
Merge pull request #4911
Browse files Browse the repository at this point in the history
611116d header include cleanup (Philip Kaufmann)
  • Loading branch information
sipa committed Sep 16, 2014
2 parents 765f398 + 611116d commit 7388b74
Show file tree
Hide file tree
Showing 36 changed files with 65 additions and 46 deletions.
6 changes: 3 additions & 3 deletions src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ BITCOIN_CORE_H = \
script/script.h \
script/sign.h \
script/standard.h \
wallet_ismine.h \
serialize.h \
sync.h \
threadsafety.h \
Expand All @@ -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 = \
Expand Down Expand Up @@ -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)

Expand Down
1 change: 1 addition & 0 deletions src/allocators.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

#include <boost/thread/mutex.hpp>
#include <boost/thread/once.hpp>

#include <openssl/crypto.h> // for OPENSSL_cleanse()

/**
Expand Down
4 changes: 2 additions & 2 deletions src/bitcoin-cli.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
13 changes: 7 additions & 6 deletions src/bitcoin-tx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 <stdio.h>
#include <boost/assign/list_of.hpp>

#include <boost/algorithm/string.hpp>
#include <boost/assign/list_of.hpp>

using namespace std;
using namespace boost::assign;
using namespace std;

static bool fCreateBlank;
static map<string,UniValue> registers;
Expand Down
2 changes: 1 addition & 1 deletion src/chainparamsbase.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
#ifndef BITCOIN_CHAIN_PARAMS_BASE_H
#define BITCOIN_CHAIN_PARAMS_BASE_H

#include <vector>
#include <string>
#include <vector>

/**
* CBaseChainParams defines the base parameters (shared between bitcoin-cli and bitcoind)
Expand Down
2 changes: 1 addition & 1 deletion src/core_io.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
#include <string>
#include <vector>

class uint256;
class CScript;
class CTransaction;
class uint256;
class UniValue;

// core_read.cpp
Expand Down
11 changes: 6 additions & 5 deletions src/core_read.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 <boost/assign/list_of.hpp>
#include <boost/algorithm/string/classification.hpp>
#include <boost/algorithm/string/predicate.hpp>
#include <boost/algorithm/string/split.hpp>
#include <boost/algorithm/string/replace.hpp>
#include "univalue/univalue.h"
#include <boost/algorithm/string/split.hpp>
#include <boost/assign/list_of.hpp>

using namespace std;
using namespace boost;
using namespace boost::algorithm;
using namespace std;

CScript ParseScript(std::string s)
{
Expand Down
7 changes: 4 additions & 3 deletions src/core_write.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 <boost/foreach.hpp>

Expand Down
1 change: 1 addition & 0 deletions src/crypto/ripemd160.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include "crypto/ripemd160.h"

#include "crypto/common.h"

#include <string.h>

// Internal implementation code.
Expand Down
1 change: 1 addition & 0 deletions src/crypto/sha1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include "crypto/sha1.h"

#include "crypto/common.h"

#include <string.h>

// Internal implementation code.
Expand Down
1 change: 1 addition & 0 deletions src/crypto/sha2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include "crypto/sha2.h"

#include "crypto/common.h"

#include <string.h>

// Internal implementation code.
Expand Down
1 change: 1 addition & 0 deletions src/db.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include <boost/filesystem.hpp>
#include <boost/thread.hpp>
#include <boost/version.hpp>

#include <openssl/rand.h>

using namespace std;
Expand Down
4 changes: 3 additions & 1 deletion src/db.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,14 @@
#include <vector>

#include <boost/filesystem/path.hpp>

#include <db_cxx.h>

struct CBlockLocator;
class CDiskBlockIndex;
class COutPoint;

struct CBlockLocator;

extern unsigned int nWalletDBUpdated;

void ThreadFlushWalletDB(const std::string& strWalletFile);
Expand Down
2 changes: 1 addition & 1 deletion src/hash.h
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion src/init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

#include "addrman.h"
#include "checkpoints.h"
#include "compat/sanity.h"
#include "key.h"
#include "main.h"
#include "miner.h"
Expand All @@ -32,7 +33,6 @@
#ifndef WIN32
#include <signal.h>
#endif
#include "compat/sanity.h"

#include <boost/algorithm/string/predicate.hpp>
#include <boost/algorithm/string/replace.hpp>
Expand Down
1 change: 1 addition & 0 deletions src/leveldbwrapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include "version.h"

#include <boost/filesystem/path.hpp>

#include <leveldb/db.h>
#include <leveldb/write_batch.h>

Expand Down
2 changes: 1 addition & 1 deletion src/net.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@
#endif
#endif

using namespace std;
using namespace boost;
using namespace std;

namespace {
const int MAX_OUTBOUND_CONNECTIONS = 8;
Expand Down
2 changes: 1 addition & 1 deletion src/pow.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@

#include <stdint.h>

class CBlockIndex;
class CBlockHeader;
class CBlockIndex;
class uint256;

unsigned int GetNextWorkRequired(const CBlockIndex* pindexLast, const CBlockHeader *pblock);
Expand Down
4 changes: 3 additions & 1 deletion src/random.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,12 @@
#include "util.h" // for LogPrint()
#include "utilstrencodings.h" // for GetTime()

#include <limits>

#ifndef WIN32
#include <sys/time.h>
#endif
#include <limits>

#include <openssl/crypto.h>
#include <openssl/err.h>
#include <openssl/rand.h>
Expand Down
2 changes: 1 addition & 1 deletion src/rpcclient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 <set>
#include "rpcclient.h"

#include "rpcprotocol.h"
#include "util.h"
#include "ui_interface.h"
#include "chainparams.h" // for Params().RPCPort()

#include <set>
#include <stdint.h>

using namespace std;
Expand Down
3 changes: 2 additions & 1 deletion src/rpcdump.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,16 @@
#include "init.h"
#include "main.h"
#include "sync.h"
#include "utiltime.h"
#include "util.h"
#include "utiltime.h"
#include "wallet.h"

#include <fstream>
#include <stdint.h>

#include <boost/algorithm/string.hpp>
#include <boost/date_time/posix_time/posix_time.hpp>

#include "json/json_spirit_value.h"

using namespace json_spirit;
Expand Down
4 changes: 2 additions & 2 deletions src/rpcmining.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 1 addition & 0 deletions src/rpcnet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#include "util.h"

#include <boost/foreach.hpp>

#include "json/json_spirit_value.h"

using namespace json_spirit;
Expand Down
2 changes: 1 addition & 1 deletion src/rpcprotocol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions src/rpcrawtransaction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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)
{
Expand Down
2 changes: 1 addition & 1 deletion src/serialize.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@

#include <algorithm>
#include <assert.h>
#include <limits>
#include <ios>
#include <limits>
#include <map>
#include <set>
#include <stdint.h>
Expand Down
3 changes: 2 additions & 1 deletion src/sync.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@
#include "util.h"
#include "utilstrencodings.h"

#include <stdio.h>

#include <boost/foreach.hpp>
#include <boost/thread.hpp>
#include <stdio.h>

#ifdef DEBUG_LOCKCONTENTION
void PrintLockContention(const char* pszName, const char* pszFile, int nLine)
Expand Down
4 changes: 2 additions & 2 deletions src/timedata.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
#ifndef BITCOIN_TIMEDATA_H
#define BITCOIN_TIMEDATA_H

#include <stdint.h>
#include <vector>
#include <algorithm>
#include <assert.h>
#include <stdint.h>
#include <vector>

class CNetAddr;

Expand Down
Loading

0 comments on commit 7388b74

Please sign in to comment.