Skip to content

Commit fa57608

Browse files
author
MarcoFalke
committed
Remove unused includes from txmempool.h
... and move them to where they are really needed. This was found by IWYU: txmempool.h should remove these lines: - #include <random.h> // lines 29-29 - class CBlockIndex; // lines 43-43 - class Chainstate; // lines 45-45 Also, move the stdlib section to the right place. Can be reviewed with: --color-moved=dimmed-zebra
1 parent 6ce5e8f commit fa57608

File tree

3 files changed

+12
-13
lines changed

3 files changed

+12
-13
lines changed

src/node/miner.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,11 @@
2121
#include <boost/multi_index_container.hpp>
2222

2323
class ArgsManager;
24-
class ChainstateManager;
2524
class CBlockIndex;
2625
class CChainParams;
2726
class CScript;
27+
class Chainstate;
28+
class ChainstateManager;
2829

2930
namespace Consensus { struct Params; };
3031

src/test/miniminer_tests.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// Distributed under the MIT software license, see the accompanying
33
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
44
#include <node/mini_miner.h>
5+
#include <random.h>
56
#include <txmempool.h>
67
#include <util/time.h>
78

src/txmempool.h

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,6 @@
66
#ifndef BITCOIN_TXMEMPOOL_H
77
#define BITCOIN_TXMEMPOOL_H
88

9-
#include <atomic>
10-
#include <map>
11-
#include <optional>
12-
#include <set>
13-
#include <string>
14-
#include <string_view>
15-
#include <utility>
16-
#include <vector>
17-
189
#include <kernel/mempool_limits.h>
1910
#include <kernel/mempool_options.h>
2011

@@ -26,7 +17,6 @@
2617
#include <policy/feerate.h>
2718
#include <policy/packages.h>
2819
#include <primitives/transaction.h>
29-
#include <random.h>
3020
#include <sync.h>
3121
#include <util/epochguard.h>
3222
#include <util/hasher.h>
@@ -40,9 +30,16 @@
4030
#include <boost/multi_index/tag.hpp>
4131
#include <boost/multi_index_container.hpp>
4232

43-
class CBlockIndex;
33+
#include <atomic>
34+
#include <map>
35+
#include <optional>
36+
#include <set>
37+
#include <string>
38+
#include <string_view>
39+
#include <utility>
40+
#include <vector>
41+
4442
class CChain;
45-
class Chainstate;
4643

4744
/** Fake height value used in Coin to signify they are only in the memory pool (since 0.8) */
4845
static const uint32_t MEMPOOL_HEIGHT = 0x7FFFFFFF;

0 commit comments

Comments
 (0)