Browse Source

Merge pull request #5697

60c8bac Includes: Cleanup around net main and wallet (Jorge Timón)
9dd793f TRIVIAL: Missing includes (Jorge Timón)
0.13
Wladimir J. van der Laan 10 years ago
parent
commit
ca37e0f339
No known key found for this signature in database
GPG Key ID: 74810B012346C9A6
  1. 1
      src/alert.cpp
  2. 2
      src/bitcoind.cpp
  3. 1
      src/checkpoints.cpp
  4. 5
      src/init.cpp
  5. 8
      src/main.cpp
  6. 11
      src/main.h
  7. 4
      src/miner.cpp
  8. 4
      src/net.cpp
  9. 3
      src/net.h
  10. 2
      src/qt/bitcoin.cpp
  11. 1
      src/qt/clientmodel.cpp
  12. 3
      src/qt/coincontroldialog.cpp
  13. 2
      src/qt/guiutil.cpp
  14. 2
      src/qt/optionsdialog.cpp
  15. 2
      src/qt/optionsmodel.cpp
  16. 2
      src/qt/paymentserver.cpp
  17. 2
      src/qt/peertablemodel.h
  18. 1
      src/qt/rpcconsole.cpp
  19. 3
      src/qt/sendcoinsdialog.cpp
  20. 2
      src/qt/transactiontablemodel.cpp
  21. 2
      src/qt/walletmodel.cpp
  22. 1
      src/rest.cpp
  23. 6
      src/rpcblockchain.cpp
  24. 3
      src/rpcmining.cpp
  25. 1
      src/rpcmisc.cpp
  26. 2
      src/rpcnet.cpp
  27. 4
      src/rpcrawtransaction.cpp
  28. 5
      src/test/DoS_tests.cpp
  29. 5
      src/test/alert_tests.cpp
  30. 3
      src/test/checkblock_tests.cpp
  31. 1
      src/test/mempool_tests.cpp
  32. 5
      src/test/miner_tests.cpp
  33. 4
      src/test/pow_tests.cpp
  34. 2
      src/test/script_tests.cpp
  35. 5
      src/test/sighash_tests.cpp
  36. 2
      src/test/skiplist_tests.cpp
  37. 1
      src/test/test_bitcoin.cpp
  38. 3
      src/test/transaction_tests.cpp
  39. 1
      src/txdb.cpp
  40. 3
      src/wallet/rpcdump.cpp
  41. 1
      src/wallet/rpcwallet.cpp
  42. 6
      src/wallet/wallet.cpp
  43. 5
      src/wallet/wallet.h
  44. 3
      src/wallet/wallet_ismine.h
  45. 2
      src/wallet/walletdb.cpp
  46. 1
      src/wallet/walletdb.h

1
src/alert.cpp

@ -11,6 +11,7 @@ @@ -11,6 +11,7 @@
#include "timedata.h"
#include "ui_interface.h"
#include "util.h"
#include "utilstrencodings.h"
#include <stdint.h>
#include <algorithm>

2
src/bitcoind.cpp

@ -3,10 +3,10 @@ @@ -3,10 +3,10 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "chainparams.h"
#include "clientversion.h"
#include "rpcserver.h"
#include "init.h"
#include "main.h"
#include "noui.h"
#include "scheduler.h"
#include "util.h"

1
src/checkpoints.cpp

@ -4,6 +4,7 @@ @@ -4,6 +4,7 @@
#include "checkpoints.h"
#include "chain.h"
#include "chainparams.h"
#include "main.h"
#include "uint256.h"

5
src/init.cpp

@ -11,6 +11,8 @@ @@ -11,6 +11,8 @@
#include "addrman.h"
#include "amount.h"
#include "chain.h"
#include "chainparams.h"
#include "checkpoints.h"
#include "compat/sanity.h"
#include "consensus/validation.h"
@ -23,11 +25,14 @@ @@ -23,11 +25,14 @@
#include "script/standard.h"
#include "scheduler.h"
#include "txdb.h"
#include "txmempool.h"
#include "ui_interface.h"
#include "util.h"
#include "utilmoneystr.h"
#include "utilstrencodings.h"
#include "validationinterface.h"
#ifdef ENABLE_WALLET
#include "wallet/db.h"
#include "wallet/wallet.h"
#include "wallet/walletdb.h"
#endif

8
src/main.cpp

@ -13,17 +13,25 @@ @@ -13,17 +13,25 @@
#include "checkqueue.h"
#include "consensus/consensus.h"
#include "consensus/validation.h"
#include "hash.h"
#include "init.h"
#include "merkleblock.h"
#include "net.h"
#include "policy/policy.h"
#include "pow.h"
#include "primitives/block.h"
#include "primitives/transaction.h"
#include "script/script.h"
#include "script/sigcache.h"
#include "script/standard.h"
#include "tinyformat.h"
#include "txdb.h"
#include "txmempool.h"
#include "ui_interface.h"
#include "undo.h"
#include "util.h"
#include "utilmoneystr.h"
#include "utilstrencodings.h"
#include "validationinterface.h"
#include <sstream>

11
src/main.h

@ -12,18 +12,10 @@ @@ -12,18 +12,10 @@
#include "amount.h"
#include "chain.h"
#include "chainparams.h"
#include "coins.h"
#include "net.h"
#include "primitives/block.h"
#include "primitives/transaction.h"
#include "script/script.h"
#include "script/sigcache.h"
#include "script/standard.h"
#include "script/script_error.h"
#include "sync.h"
#include "tinyformat.h"
#include "txmempool.h"
#include "uint256.h"
#include <algorithm>
#include <exception>
@ -41,6 +33,7 @@ class CBlockTreeDB; @@ -41,6 +33,7 @@ class CBlockTreeDB;
class CBloomFilter;
class CInv;
class CScriptCheck;
class CTxMemPool;
class CValidationInterface;
class CValidationState;

4
src/miner.cpp

@ -6,7 +6,9 @@ @@ -6,7 +6,9 @@
#include "miner.h"
#include "amount.h"
#include "chain.h"
#include "chainparams.h"
#include "coins.h"
#include "consensus/consensus.h"
#include "consensus/validation.h"
#include "hash.h"
@ -15,7 +17,9 @@ @@ -15,7 +17,9 @@
#include "policy/policy.h"
#include "pow.h"
#include "primitives/transaction.h"
#include "script/standard.h"
#include "timedata.h"
#include "txmempool.h"
#include "util.h"
#include "utilmoneystr.h"
#include "validationinterface.h"

4
src/net.cpp

@ -12,10 +12,12 @@ @@ -12,10 +12,12 @@
#include "addrman.h"
#include "chainparams.h"
#include "clientversion.h"
#include "crypto/common.h"
#include "hash.h"
#include "primitives/transaction.h"
#include "scheduler.h"
#include "ui_interface.h"
#include "crypto/common.h"
#include "utilstrencodings.h"
#ifdef WIN32
#include <string.h>

3
src/net.h

@ -8,7 +8,6 @@ @@ -8,7 +8,6 @@
#include "bloom.h"
#include "compat.h"
#include "hash.h"
#include "limitedmap.h"
#include "mruset.h"
#include "netbase.h"
@ -17,7 +16,6 @@ @@ -17,7 +16,6 @@
#include "streams.h"
#include "sync.h"
#include "uint256.h"
#include "utilstrencodings.h"
#include <deque>
#include <stdint.h>
@ -31,7 +29,6 @@ @@ -31,7 +29,6 @@
#include <boost/signals2/signal.hpp>
class CAddrMan;
class CBlockIndex;
class CScheduler;
class CNode;

2
src/qt/bitcoin.cpp

@ -8,6 +8,7 @@ @@ -8,6 +8,7 @@
#include "bitcoingui.h"
#include "chainparams.h"
#include "clientmodel.h"
#include "guiconstants.h"
#include "guiutil.h"
@ -24,7 +25,6 @@ @@ -24,7 +25,6 @@
#endif
#include "init.h"
#include "main.h"
#include "rpcserver.h"
#include "scheduler.h"
#include "ui_interface.h"

1
src/qt/clientmodel.cpp

@ -11,7 +11,6 @@ @@ -11,7 +11,6 @@
#include "chainparams.h"
#include "checkpoints.h"
#include "clientversion.h"
#include "main.h"
#include "net.h"
#include "ui_interface.h"
#include "util.h"

3
src/qt/coincontroldialog.cpp

@ -10,11 +10,12 @@ @@ -10,11 +10,12 @@
#include "guiutil.h"
#include "optionsmodel.h"
#include "scicon.h"
#include "txmempool.h"
#include "walletmodel.h"
#include "coincontrol.h"
#include "init.h"
#include "main.h"
#include "main.h" // For minRelayTxFee
#include "wallet/wallet.h"
#include <boost/assign/list_of.hpp> // for 'map_list_of()'

2
src/qt/guiutil.cpp

@ -11,7 +11,7 @@ @@ -11,7 +11,7 @@
#include "primitives/transaction.h"
#include "init.h"
#include "main.h"
#include "main.h" // For minRelayTxFee
#include "protocol.h"
#include "script/script.h"
#include "script/standard.h"

2
src/qt/optionsdialog.cpp

@ -13,7 +13,7 @@ @@ -13,7 +13,7 @@
#include "guiutil.h"
#include "optionsmodel.h"
#include "main.h" // for MAX_SCRIPTCHECK_THREADS
#include "main.h" // for DEFAULT_SCRIPTCHECK_THREADS and MAX_SCRIPTCHECK_THREADS
#include "netbase.h"
#include "txdb.h" // for -dbcache defaults

2
src/qt/optionsmodel.cpp

@ -13,7 +13,7 @@ @@ -13,7 +13,7 @@
#include "amount.h"
#include "init.h"
#include "main.h"
#include "main.h" // For DEFAULT_SCRIPTCHECK_THREADS
#include "net.h"
#include "txdb.h" // for -dbcache defaults

2
src/qt/paymentserver.cpp

@ -10,7 +10,7 @@ @@ -10,7 +10,7 @@
#include "base58.h"
#include "chainparams.h"
#include "main.h"
#include "main.h" // For minRelayTxFee
#include "ui_interface.h"
#include "util.h"
#include "wallet/wallet.h"

2
src/qt/peertablemodel.h

@ -5,7 +5,7 @@ @@ -5,7 +5,7 @@
#ifndef BITCOIN_QT_PEERTABLEMODEL_H
#define BITCOIN_QT_PEERTABLEMODEL_H
#include "main.h"
#include "main.h" // For CNodeStateStats
#include "net.h"
#include <QAbstractTableModel>

1
src/qt/rpcconsole.cpp

@ -10,7 +10,6 @@ @@ -10,7 +10,6 @@
#include "peertablemodel.h"
#include "scicon.h"
#include "main.h"
#include "chainparams.h"
#include "rpcserver.h"
#include "rpcclient.h"

3
src/qt/sendcoinsdialog.cpp

@ -17,8 +17,9 @@ @@ -17,8 +17,9 @@
#include "base58.h"
#include "coincontrol.h"
#include "main.h"
#include "main.h" // mempool and minRelayTxFee
#include "ui_interface.h"
#include "txmempool.h"
#include "wallet/wallet.h"
#include <QMessageBox>

2
src/qt/transactiontablemodel.cpp

@ -25,6 +25,8 @@ @@ -25,6 +25,8 @@
#include <QIcon>
#include <QList>
#include <boost/foreach.hpp>
// Amount column is right-aligned it contains numbers
static int column_alignments[] = {
Qt::AlignLeft|Qt::AlignVCenter, /* status */

2
src/qt/walletmodel.cpp

@ -25,6 +25,8 @@ @@ -25,6 +25,8 @@
#include <QSet>
#include <QTimer>
#include <boost/foreach.hpp>
WalletModel::WalletModel(CWallet *wallet, OptionsModel *optionsModel, QObject *parent) :
QObject(parent), wallet(wallet), optionsModel(optionsModel), addressTableModel(0),
transactionTableModel(0),

1
src/rest.cpp

@ -3,6 +3,7 @@ @@ -3,6 +3,7 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "chain.h"
#include "primitives/block.h"
#include "primitives/transaction.h"
#include "main.h"

6
src/rpcblockchain.cpp

@ -3,13 +3,19 @@ @@ -3,13 +3,19 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "chain.h"
#include "chainparams.h"
#include "checkpoints.h"
#include "coins.h"
#include "consensus/validation.h"
#include "main.h"
#include "primitives/transaction.h"
#include "rpcserver.h"
#include "streams.h"
#include "sync.h"
#include "txmempool.h"
#include "util.h"
#include "utilstrencodings.h"
#include <stdint.h>

3
src/rpcmining.cpp

@ -4,6 +4,7 @@ @@ -4,6 +4,7 @@
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "amount.h"
#include "chain.h"
#include "chainparams.h"
#include "consensus/consensus.h"
#include "consensus/validation.h"
@ -14,7 +15,9 @@ @@ -14,7 +15,9 @@
#include "net.h"
#include "pow.h"
#include "rpcserver.h"
#include "txmempool.h"
#include "util.h"
#include "utilstrencodings.h"
#include "validationinterface.h"
#include <stdint.h>

1
src/rpcmisc.cpp

@ -12,6 +12,7 @@ @@ -12,6 +12,7 @@
#include "rpcserver.h"
#include "timedata.h"
#include "util.h"
#include "utilstrencodings.h"
#ifdef ENABLE_WALLET
#include "wallet/wallet.h"
#include "wallet/walletdb.h"

2
src/rpcnet.cpp

@ -4,6 +4,7 @@ @@ -4,6 +4,7 @@
#include "rpcserver.h"
#include "chainparams.h"
#include "clientversion.h"
#include "main.h"
#include "net.h"
@ -12,6 +13,7 @@ @@ -12,6 +13,7 @@
#include "sync.h"
#include "timedata.h"
#include "util.h"
#include "utilstrencodings.h"
#include "version.h"
#include <boost/foreach.hpp>

4
src/rpcrawtransaction.cpp

@ -4,6 +4,8 @@ @@ -4,6 +4,8 @@
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "base58.h"
#include "chain.h"
#include "coins.h"
#include "consensus/validation.h"
#include "core_io.h"
#include "init.h"
@ -18,7 +20,9 @@ @@ -18,7 +20,9 @@
#include "script/script_error.h"
#include "script/sign.h"
#include "script/standard.h"
#include "txmempool.h"
#include "uint256.h"
#include "utilstrencodings.h"
#ifdef ENABLE_WALLET
#include "wallet/wallet.h"
#endif

5
src/test/DoS_tests.cpp

@ -2,12 +2,9 @@ @@ -2,12 +2,9 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
//
// Unit tests for denial-of-service detection/prevention code
//
#include "chainparams.h"
#include "keystore.h"
#include "main.h"
#include "net.h"

5
src/test/alert_tests.cpp

@ -2,17 +2,14 @@ @@ -2,17 +2,14 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
//
// Unit tests for alert system
//
#include "alert.h"
#include "chain.h"
#include "chainparams.h"
#include "clientversion.h"
#include "data/alertTests.raw.h"
#include "main.h"
#include "main.h" // For PartitionCheck
#include "serialize.h"
#include "streams.h"
#include "util.h"

3
src/test/checkblock_tests.cpp

@ -4,7 +4,8 @@ @@ -4,7 +4,8 @@
#include "clientversion.h"
#include "consensus/validation.h"
#include "main.h"
#include "main.h" // For CheckBlock
#include "primitives/block.h"
#include "test/test_bitcoin.h"
#include "utiltime.h"

1
src/test/mempool_tests.cpp

@ -2,7 +2,6 @@ @@ -2,7 +2,6 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "main.h"
#include "txmempool.h"
#include "util.h"

5
src/test/miner_tests.cpp

@ -2,12 +2,17 @@ @@ -2,12 +2,17 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "chainparams.h"
#include "coins.h"
#include "consensus/validation.h"
#include "main.h"
#include "miner.h"
#include "pubkey.h"
#include "script/standard.h"
#include "txmempool.h"
#include "uint256.h"
#include "util.h"
#include "utilstrencodings.h"
#include "test/test_bitcoin.h"

4
src/test/pow_tests.cpp

@ -2,8 +2,10 @@ @@ -2,8 +2,10 @@
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "main.h"
#include "chain.h"
#include "chainparams.h"
#include "pow.h"
#include "random.h"
#include "util.h"
#include "test/test_bitcoin.h"

2
src/test/script_tests.cpp

@ -8,11 +8,11 @@ @@ -8,11 +8,11 @@
#include "core_io.h"
#include "key.h"
#include "keystore.h"
#include "main.h"
#include "script/script.h"
#include "script/script_error.h"
#include "script/sign.h"
#include "util.h"
#include "utilstrencodings.h"
#include "test/test_bitcoin.h"
#if defined(HAVE_CONSENSUS_LIB)

5
src/test/sighash_tests.cpp

@ -4,13 +4,16 @@ @@ -4,13 +4,16 @@
#include "consensus/validation.h"
#include "data/sighash.json.h"
#include "main.h"
#include "hash.h"
#include "main.h" // For CheckTransaction
#include "random.h"
#include "script/interpreter.h"
#include "script/script.h"
#include "serialize.h"
#include "streams.h"
#include "test/test_bitcoin.h"
#include "util.h"
#include "utilstrencodings.h"
#include "version.h"
#include <iostream>

2
src/test/skiplist_tests.cpp

@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "main.h"
#include "chain.h"
#include "random.h"
#include "util.h"
#include "test/test_bitcoin.h"

1
src/test/test_bitcoin.cpp

@ -6,6 +6,7 @@ @@ -6,6 +6,7 @@
#include "test_bitcoin.h"
#include "chainparams.h"
#include "key.h"
#include "main.h"
#include "random.h"

3
src/test/transaction_tests.cpp

@ -11,10 +11,11 @@ @@ -11,10 +11,11 @@
#include "core_io.h"
#include "key.h"
#include "keystore.h"
#include "main.h"
#include "main.h" // For CheckTransaction
#include "policy/policy.h"
#include "script/script.h"
#include "script/script_error.h"
#include "utilstrencodings.h"
#include <map>
#include <string>

1
src/txdb.cpp

@ -5,6 +5,7 @@ @@ -5,6 +5,7 @@
#include "txdb.h"
#include "chain.h"
#include "chainparams.h"
#include "hash.h"
#include "main.h"

3
src/wallet/rpcdump.cpp

@ -3,6 +3,7 @@ @@ -3,6 +3,7 @@
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "base58.h"
#include "chain.h"
#include "rpcserver.h"
#include "init.h"
#include "main.h"
@ -21,6 +22,8 @@ @@ -21,6 +22,8 @@
#include "univalue/univalue.h"
#include <boost/foreach.hpp>
using namespace std;
void EnsureWalletIsUnlocked();

1
src/wallet/rpcwallet.cpp

@ -5,6 +5,7 @@ @@ -5,6 +5,7 @@
#include "amount.h"
#include "base58.h"
#include "chain.h"
#include "core_io.h"
#include "init.h"
#include "main.h"

6
src/wallet/wallet.cpp

@ -7,15 +7,21 @@ @@ -7,15 +7,21 @@
#include "base58.h"
#include "checkpoints.h"
#include "chain.h"
#include "coincontrol.h"
#include "consensus/consensus.h"
#include "consensus/validation.h"
#include "key.h"
#include "keystore.h"
#include "main.h"
#include "net.h"
#include "policy/policy.h"
#include "primitives/block.h"
#include "primitives/transaction.h"
#include "script/script.h"
#include "script/sign.h"
#include "timedata.h"
#include "txmempool.h"
#include "util.h"
#include "utilmoneystr.h"

5
src/wallet/wallet.h

@ -7,10 +7,7 @@ @@ -7,10 +7,7 @@
#define BITCOIN_WALLET_WALLET_H
#include "amount.h"
#include "key.h"
#include "keystore.h"
#include "primitives/block.h"
#include "primitives/transaction.h"
#include "streams.h"
#include "tinyformat.h"
#include "ui_interface.h"
#include "utilstrencodings.h"

3
src/wallet/wallet_ismine.h

@ -6,9 +6,10 @@ @@ -6,9 +6,10 @@
#ifndef BITCOIN_WALLET_WALLET_ISMINE_H
#define BITCOIN_WALLET_WALLET_ISMINE_H
#include "key.h"
#include "script/standard.h"
#include <stdint.h>
class CKeyStore;
class CScript;

2
src/wallet/walletdb.cpp

@ -7,7 +7,7 @@ @@ -7,7 +7,7 @@
#include "base58.h"
#include "consensus/validation.h"
#include "main.h"
#include "main.h" // For CheckTransaction
#include "protocol.h"
#include "serialize.h"
#include "sync.h"

1
src/wallet/walletdb.h

@ -9,7 +9,6 @@ @@ -9,7 +9,6 @@
#include "amount.h"
#include "wallet/db.h"
#include "key.h"
#include "keystore.h"
#include <list>
#include <stdint.h>

Loading…
Cancel
Save