Browse Source

Includes: Cleanup around net main and wallet

-Move from .h to .cpp: in main, net and wallet
-Remove unnecessary #include "main.h"
-Cleanup some wallet files includes
0.13
Jorge Timón 10 years ago
parent
commit
60c8bac77c
  1. 1
      src/bitcoind.cpp
  2. 6
      src/main.cpp
  3. 10
      src/main.h
  4. 4
      src/net.cpp
  5. 3
      src/net.h
  6. 1
      src/qt/bitcoin.cpp
  7. 1
      src/qt/clientmodel.cpp
  8. 2
      src/qt/coincontroldialog.cpp
  9. 2
      src/qt/guiutil.cpp
  10. 2
      src/qt/optionsdialog.cpp
  11. 2
      src/qt/optionsmodel.cpp
  12. 2
      src/qt/paymentserver.cpp
  13. 2
      src/qt/peertablemodel.h
  14. 1
      src/qt/rpcconsole.cpp
  15. 2
      src/qt/sendcoinsdialog.cpp
  16. 5
      src/test/alert_tests.cpp
  17. 2
      src/test/checkblock_tests.cpp
  18. 1
      src/test/mempool_tests.cpp
  19. 1
      src/test/pow_tests.cpp
  20. 1
      src/test/script_tests.cpp
  21. 2
      src/test/sighash_tests.cpp
  22. 1
      src/test/skiplist_tests.cpp
  23. 2
      src/test/transaction_tests.cpp
  24. 4
      src/wallet/wallet.cpp
  25. 4
      src/wallet/wallet.h
  26. 1
      src/wallet/wallet_ismine.h
  27. 2
      src/wallet/walletdb.cpp
  28. 1
      src/wallet/walletdb.h

1
src/bitcoind.cpp

@ -7,7 +7,6 @@
#include "clientversion.h" #include "clientversion.h"
#include "rpcserver.h" #include "rpcserver.h"
#include "init.h" #include "init.h"
#include "main.h"
#include "noui.h" #include "noui.h"
#include "scheduler.h" #include "scheduler.h"
#include "util.h" #include "util.h"

6
src/main.cpp

@ -19,6 +19,12 @@
#include "net.h" #include "net.h"
#include "policy/policy.h" #include "policy/policy.h"
#include "pow.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 "txdb.h"
#include "txmempool.h" #include "txmempool.h"
#include "ui_interface.h" #include "ui_interface.h"

10
src/main.h

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

4
src/net.cpp

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

3
src/net.h

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

1
src/qt/bitcoin.cpp

@ -25,7 +25,6 @@
#endif #endif
#include "init.h" #include "init.h"
#include "main.h"
#include "rpcserver.h" #include "rpcserver.h"
#include "scheduler.h" #include "scheduler.h"
#include "ui_interface.h" #include "ui_interface.h"

1
src/qt/clientmodel.cpp

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

2
src/qt/coincontroldialog.cpp

@ -15,7 +15,7 @@
#include "coincontrol.h" #include "coincontrol.h"
#include "init.h" #include "init.h"
#include "main.h" #include "main.h" // For minRelayTxFee
#include "wallet/wallet.h" #include "wallet/wallet.h"
#include <boost/assign/list_of.hpp> // for 'map_list_of()' #include <boost/assign/list_of.hpp> // for 'map_list_of()'

2
src/qt/guiutil.cpp

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

2
src/qt/optionsdialog.cpp

@ -13,7 +13,7 @@
#include "guiutil.h" #include "guiutil.h"
#include "optionsmodel.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 "netbase.h"
#include "txdb.h" // for -dbcache defaults #include "txdb.h" // for -dbcache defaults

2
src/qt/optionsmodel.cpp

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

2
src/qt/paymentserver.cpp

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

2
src/qt/peertablemodel.h

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

1
src/qt/rpcconsole.cpp

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

2
src/qt/sendcoinsdialog.cpp

@ -17,7 +17,7 @@
#include "base58.h" #include "base58.h"
#include "coincontrol.h" #include "coincontrol.h"
#include "main.h" #include "main.h" // mempool and minRelayTxFee
#include "ui_interface.h" #include "ui_interface.h"
#include "txmempool.h" #include "txmempool.h"
#include "wallet/wallet.h" #include "wallet/wallet.h"

5
src/test/alert_tests.cpp

@ -2,17 +2,14 @@
// Distributed under the MIT software license, see the accompanying // Distributed under the MIT 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.
//
// Unit tests for alert system // Unit tests for alert system
//
#include "alert.h" #include "alert.h"
#include "chain.h" #include "chain.h"
#include "chainparams.h" #include "chainparams.h"
#include "clientversion.h" #include "clientversion.h"
#include "data/alertTests.raw.h" #include "data/alertTests.raw.h"
#include "main.h" // For PartitionCheck
#include "main.h"
#include "serialize.h" #include "serialize.h"
#include "streams.h" #include "streams.h"
#include "util.h" #include "util.h"

2
src/test/checkblock_tests.cpp

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

1
src/test/mempool_tests.cpp

@ -2,7 +2,6 @@
// Distributed under the MIT software license, see the accompanying // Distributed under the MIT 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 "main.h"
#include "txmempool.h" #include "txmempool.h"
#include "util.h" #include "util.h"

1
src/test/pow_tests.cpp

@ -4,7 +4,6 @@
#include "chain.h" #include "chain.h"
#include "chainparams.h" #include "chainparams.h"
#include "main.h"
#include "pow.h" #include "pow.h"
#include "random.h" #include "random.h"
#include "util.h" #include "util.h"

1
src/test/script_tests.cpp

@ -8,7 +8,6 @@
#include "core_io.h" #include "core_io.h"
#include "key.h" #include "key.h"
#include "keystore.h" #include "keystore.h"
#include "main.h"
#include "script/script.h" #include "script/script.h"
#include "script/script_error.h" #include "script/script_error.h"
#include "script/sign.h" #include "script/sign.h"

2
src/test/sighash_tests.cpp

@ -5,7 +5,7 @@
#include "consensus/validation.h" #include "consensus/validation.h"
#include "data/sighash.json.h" #include "data/sighash.json.h"
#include "hash.h" #include "hash.h"
#include "main.h" #include "main.h" // For CheckTransaction
#include "random.h" #include "random.h"
#include "script/interpreter.h" #include "script/interpreter.h"
#include "script/script.h" #include "script/script.h"

1
src/test/skiplist_tests.cpp

@ -3,7 +3,6 @@
// file COPYING or http://www.opensource.org/licenses/mit-license.php. // file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "chain.h" #include "chain.h"
#include "main.h"
#include "random.h" #include "random.h"
#include "util.h" #include "util.h"
#include "test/test_bitcoin.h" #include "test/test_bitcoin.h"

2
src/test/transaction_tests.cpp

@ -11,7 +11,7 @@
#include "core_io.h" #include "core_io.h"
#include "key.h" #include "key.h"
#include "keystore.h" #include "keystore.h"
#include "main.h" #include "main.h" // For CheckTransaction
#include "policy/policy.h" #include "policy/policy.h"
#include "script/script.h" #include "script/script.h"
#include "script/script_error.h" #include "script/script_error.h"

4
src/wallet/wallet.cpp

@ -11,9 +11,13 @@
#include "coincontrol.h" #include "coincontrol.h"
#include "consensus/consensus.h" #include "consensus/consensus.h"
#include "consensus/validation.h" #include "consensus/validation.h"
#include "key.h"
#include "keystore.h"
#include "main.h" #include "main.h"
#include "net.h" #include "net.h"
#include "policy/policy.h" #include "policy/policy.h"
#include "primitives/block.h"
#include "primitives/transaction.h"
#include "script/script.h" #include "script/script.h"
#include "script/sign.h" #include "script/sign.h"
#include "timedata.h" #include "timedata.h"

4
src/wallet/wallet.h

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

1
src/wallet/wallet_ismine.h

@ -6,7 +6,6 @@
#ifndef BITCOIN_WALLET_WALLET_ISMINE_H #ifndef BITCOIN_WALLET_WALLET_ISMINE_H
#define BITCOIN_WALLET_WALLET_ISMINE_H #define BITCOIN_WALLET_WALLET_ISMINE_H
#include "key.h"
#include "script/standard.h" #include "script/standard.h"
#include <stdint.h> #include <stdint.h>

2
src/wallet/walletdb.cpp

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

1
src/wallet/walletdb.h

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

Loading…
Cancel
Save