diff options
author | MarcoFalke <falke.marco@gmail.com> | 2019-06-06 16:41:24 +0200 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2019-06-06 16:41:40 +0200 |
commit | d0f81a96d9c158a9226dc946bdd61d48c4d42959 (patch) | |
tree | b3c31f70a35fe6ffcd872714afb4df6005f3df44 /src/wallet | |
parent | 36fb968825a19aa1b01661228ba53209ec7a033e (diff) | |
parent | 67f4e9c52270f9ddf8f7e83f0906af5e6743b33a (diff) | |
download | bitcoin-d0f81a96d9c158a9226dc946bdd61d48c4d42959.tar.xz |
Merge #16129: refactor: Remove unused includes
67f4e9c522 Include core_io.h from core_read.cpp (practicalswift)
eca9767673 Make reasoning about dependencies easier by not including unused dependencies (practicalswift)
Pull request description:
Make reasoning about dependencies easier by not including unused dependencies.
Please note that the removed headers are _not_ "transitively included" by other still included headers. Thus the removals are real.
As an added bonus this change means less work for the preprocessor/compiler. At least 51 393 lines of code no longer needs to be processed:
```
$ git diff -u HEAD~1 | grep -E '^\-#include ' | cut -f2 -d"<" | cut -f1 -d">" | \
sed 's%^%src/%g' | xargs cat | wc -l
51393
```
Note that 51 393 is the lower bound: the real number is likely much higher when taking into account transitively included headers :-)
ACKs for commit 67f4e9:
Tree-SHA512: 0c8868aac59813f099ce53d5307eed7962dd6f2ff3546768ef9e5c4508b87f8210f1a22c7e826c3c06bebbf28bdbfcf1628ed354c2d0fdb9a31a42cefb8fdf13
Diffstat (limited to 'src/wallet')
-rw-r--r-- | src/wallet/db.cpp | 4 | ||||
-rw-r--r-- | src/wallet/feebumper.cpp | 4 | ||||
-rw-r--r-- | src/wallet/fees.cpp | 2 | ||||
-rw-r--r-- | src/wallet/init.cpp | 5 | ||||
-rw-r--r-- | src/wallet/rpcdump.cpp | 1 | ||||
-rw-r--r-- | src/wallet/rpcwallet.cpp | 6 | ||||
-rw-r--r-- | src/wallet/test/init_tests.cpp | 5 | ||||
-rw-r--r-- | src/wallet/test/psbt_wallet_tests.cpp | 1 | ||||
-rw-r--r-- | src/wallet/test/wallet_test_fixture.cpp | 2 | ||||
-rw-r--r-- | src/wallet/wallet.cpp | 5 | ||||
-rw-r--r-- | src/wallet/wallettool.cpp | 1 |
11 files changed, 0 insertions, 36 deletions
diff --git a/src/wallet/db.cpp b/src/wallet/db.cpp index 8633d8701b..b5f90deabd 100644 --- a/src/wallet/db.cpp +++ b/src/wallet/db.cpp @@ -5,11 +5,7 @@ #include <wallet/db.h> -#include <addrman.h> -#include <hash.h> -#include <protocol.h> #include <util/strencodings.h> -#include <wallet/walletutil.h> #include <stdint.h> diff --git a/src/wallet/feebumper.cpp b/src/wallet/feebumper.cpp index 15ddd5cb97..46cf6b7616 100644 --- a/src/wallet/feebumper.cpp +++ b/src/wallet/feebumper.cpp @@ -10,14 +10,10 @@ #include <wallet/wallet.h> #include <policy/fees.h> #include <policy/policy.h> -#include <policy/rbf.h> -#include <validation.h> //for mempool access -#include <txmempool.h> #include <util/moneystr.h> #include <util/rbf.h> #include <util/system.h> #include <util/validation.h> -#include <net.h> //! Check whether transaction has descendant in wallet or mempool, or has been //! mined, or conflicts with a mined transaction. Return a feebumper::Result. diff --git a/src/wallet/fees.cpp b/src/wallet/fees.cpp index 59d05a771a..ad69e84358 100644 --- a/src/wallet/fees.cpp +++ b/src/wallet/fees.cpp @@ -5,9 +5,7 @@ #include <wallet/fees.h> -#include <policy/policy.h> #include <util/system.h> -#include <validation.h> #include <wallet/coincontrol.h> #include <wallet/wallet.h> diff --git a/src/wallet/init.cpp b/src/wallet/init.cpp index 0b8afd5a5d..00d2a59a66 100644 --- a/src/wallet/init.cpp +++ b/src/wallet/init.cpp @@ -3,18 +3,13 @@ // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. -#include <chainparams.h> #include <init.h> #include <interfaces/chain.h> #include <net.h> -#include <scheduler.h> #include <outputtype.h> -#include <util/error.h> #include <util/system.h> #include <util/moneystr.h> -#include <validation.h> #include <walletinitinterface.h> -#include <wallet/rpcwallet.h> #include <wallet/wallet.h> #include <wallet/walletutil.h> diff --git a/src/wallet/rpcdump.cpp b/src/wallet/rpcdump.cpp index ee1b792f9b..2f2fe33ba4 100644 --- a/src/wallet/rpcdump.cpp +++ b/src/wallet/rpcdump.cpp @@ -16,7 +16,6 @@ #include <util/bip32.h> #include <util/system.h> #include <util/time.h> -#include <validation.h> #include <wallet/wallet.h> #include <wallet/rpcwallet.h> diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index c158cd4e20..29880002b3 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -4,33 +4,27 @@ // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include <amount.h> -#include <chain.h> #include <consensus/validation.h> #include <core_io.h> #include <init.h> #include <interfaces/chain.h> #include <key_io.h> -#include <net.h> #include <node/transaction.h> #include <outputtype.h> #include <policy/feerate.h> #include <policy/fees.h> -#include <policy/policy.h> #include <policy/rbf.h> #include <rpc/rawtransaction_util.h> #include <rpc/server.h> #include <rpc/util.h> #include <script/descriptor.h> #include <script/sign.h> -#include <shutdown.h> -#include <timedata.h> #include <util/bip32.h> #include <util/fees.h> #include <util/moneystr.h> #include <util/system.h> #include <util/url.h> #include <util/validation.h> -#include <validation.h> #include <wallet/coincontrol.h> #include <wallet/feebumper.h> #include <wallet/psbtwallet.h> diff --git a/src/wallet/test/init_tests.cpp b/src/wallet/test/init_tests.cpp index 9e5208b453..67e2847963 100644 --- a/src/wallet/test/init_tests.cpp +++ b/src/wallet/test/init_tests.cpp @@ -7,11 +7,6 @@ #include <test/setup_common.h> #include <wallet/test/init_test_fixture.h> -#include <init.h> -#include <walletinitinterface.h> -#include <wallet/wallet.h> - - BOOST_FIXTURE_TEST_SUITE(init_tests, InitWalletDirTestingSetup) BOOST_AUTO_TEST_CASE(walletinit_verify_walletdir_default) diff --git a/src/wallet/test/psbt_wallet_tests.cpp b/src/wallet/test/psbt_wallet_tests.cpp index 4753c7f313..cdf7113203 100644 --- a/src/wallet/test/psbt_wallet_tests.cpp +++ b/src/wallet/test/psbt_wallet_tests.cpp @@ -7,7 +7,6 @@ #include <util/bip32.h> #include <util/strencodings.h> #include <wallet/psbtwallet.h> -#include <wallet/rpcwallet.h> #include <wallet/wallet.h> #include <univalue.h> diff --git a/src/wallet/test/wallet_test_fixture.cpp b/src/wallet/test/wallet_test_fixture.cpp index e352c81519..7db0bc4249 100644 --- a/src/wallet/test/wallet_test_fixture.cpp +++ b/src/wallet/test/wallet_test_fixture.cpp @@ -4,9 +4,7 @@ #include <wallet/test/wallet_test_fixture.h> -#include <rpc/server.h> #include <wallet/db.h> -#include <wallet/rpcwallet.h> WalletTestingSetup::WalletTestingSetup(const std::string& chainName) : TestingSetup(chainName), diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index e86147b5d0..bde52d7791 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -14,17 +14,12 @@ #include <key.h> #include <key_io.h> #include <keystore.h> -#include <net.h> #include <policy/fees.h> #include <policy/policy.h> -#include <policy/rbf.h> #include <primitives/block.h> #include <primitives/transaction.h> #include <script/descriptor.h> #include <script/script.h> -#include <shutdown.h> -#include <timedata.h> -#include <txmempool.h> #include <util/bip32.h> #include <util/error.h> #include <util/fees.h> diff --git a/src/wallet/wallettool.cpp b/src/wallet/wallettool.cpp index c6132a2686..440c32c367 100644 --- a/src/wallet/wallettool.cpp +++ b/src/wallet/wallettool.cpp @@ -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 <base58.h> #include <fs.h> #include <util/system.h> #include <wallet/wallet.h> |