Skip to content

Commit d0f81a9

Browse files
author
MarcoFalke
committed
Merge #16129: refactor: Remove unused includes
67f4e9c Include core_io.h from core_read.cpp (practicalswift) eca9767 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
2 parents 36fb968 + 67f4e9c commit d0f81a9

File tree

98 files changed

+0
-212
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

98 files changed

+0
-212
lines changed

src/addrman.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77

88
#include <hash.h>
99
#include <serialize.h>
10-
#include <streams.h>
1110

1211
int CAddrInfo::GetTriedBucket(const uint256& nKey) const
1312
{

src/arith_uint256.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
#include <arith_uint256.h>
77

88
#include <uint256.h>
9-
#include <util/strencodings.h>
109
#include <crypto/common.h>
1110

1211
#include <stdio.h>

src/bench/base58.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
#include <bench/bench.h>
66

7-
#include <validation.h>
87
#include <base58.h>
98

109
#include <array>

src/bench/bech32.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
#include <bench/bench.h>
66

7-
#include <validation.h>
87
#include <bech32.h>
98
#include <util/strencodings.h>
109

src/bench/bench_bitcoin.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44

55
#include <bench/bench.h>
66

7-
#include <crypto/sha256.h>
8-
#include <key.h>
97
#include <util/strencodings.h>
108
#include <util/system.h>
119

src/bench/chacha20.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
#include <iostream>
66

77
#include <bench/bench.h>
8-
#include <hash.h>
98
#include <crypto/chacha20.h>
109

1110
/* Number of bytes to process per iteration */

src/bench/checkqueue.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
#include <bench/bench.h>
66
#include <util/system.h>
7-
#include <validation.h>
87
#include <checkqueue.h>
98
#include <prevector.h>
109
#include <vector>

src/bench/crypto_hash.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,9 @@
55
#include <iostream>
66

77
#include <bench/bench.h>
8-
#include <bloom.h>
98
#include <hash.h>
109
#include <random.h>
1110
#include <uint256.h>
12-
#include <util/time.h>
1311
#include <crypto/ripemd160.h>
1412
#include <crypto/sha1.h>
1513
#include <crypto/sha256.h>

src/bench/duplicate_inputs.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,9 @@
77
#include <coins.h>
88
#include <consensus/merkle.h>
99
#include <consensus/validation.h>
10-
#include <miner.h>
11-
#include <policy/policy.h>
1210
#include <pow.h>
13-
#include <test/util.h>
1411
#include <txmempool.h>
1512
#include <validation.h>
16-
#include <validationinterface.h>
1713

1814
#include <list>
1915
#include <vector>

src/bench/examples.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
44

55
#include <bench/bench.h>
6-
#include <validation.h>
76
#include <util/time.h>
87

98
// Sanity test: this should loop ten times, and

0 commit comments

Comments
 (0)