Skip to content

Commit d0b1f61

Browse files
committed
Merge bitcoin/bitcoin#17786: refactor: Nuke policy/fees->mempool circular dependencies
c8dc0e3 refactor: Inline `CTxMemPoolEntry` class's functions (Hennadii Stepanov) 75bbe59 refactor: Move `CTxMemPoolEntry` class to its own module (Hennadii Stepanov) Pull request description: This PR: - gets rid of the `policy/fees` -> `txmempool` -> `policy/fees` circular dependency - is an alternative to #13949, which nukes only one circular dependency ACKs for top commit: ryanofsky: Code review ACK c8dc0e3. Just include and whitespace changes since last review, and there's a moveonly commit now so it's very easy to review theStack: Code-review ACK c8dc0e3 glozow: utACK c8dc0e3, agree these changes are an improvement. Tree-SHA512: 36ece824e6ed3ab1a1e198b30a906c8ac12de24545f840eb046958a17315ac9260c7de26e11e2fbab7208adc3d74918db7a7e389444130f8810548ca2e81af41
2 parents aeb395d + c8dc0e3 commit d0b1f61

18 files changed

+190
-160
lines changed

src/Makefile.am

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,7 @@ BITCOIN_CORE_H = \
264264
torcontrol.h \
265265
txdb.h \
266266
txmempool.h \
267+
txmempool_entry.h \
267268
txorphanage.h \
268269
txrequest.h \
269270
undo.h \

src/bench/mempool_eviction.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
#include <policy/policy.h>
77
#include <test/util/setup_common.h>
88
#include <txmempool.h>
9+
#include <txmempool_entry.h>
910

1011

1112
static void AddTx(const CTransactionRef& tx, const CAmount& nFee, CTxMemPool& pool) EXCLUSIVE_LOCKS_REQUIRED(cs_main, pool.cs)

src/bench/mempool_stress.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
#include <policy/policy.h>
77
#include <test/util/setup_common.h>
88
#include <txmempool.h>
9+
#include <txmempool_entry.h>
910
#include <validation.h>
1011

1112
#include <vector>

src/bench/rpc_mempool.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#include <rpc/mempool.h>
88
#include <test/util/setup_common.h>
99
#include <txmempool.h>
10+
#include <txmempool_entry.h>
1011

1112
#include <univalue.h>
1213

src/net_processing.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
#include <timedata.h>
3535
#include <tinyformat.h>
3636
#include <txmempool.h>
37+
#include <txmempool_entry.h>
3738
#include <txorphanage.h>
3839
#include <txrequest.h>
3940
#include <util/check.h> // For NDEBUG compile time check

src/node/interfaces.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
#include <support/allocators/secure.h>
4040
#include <sync.h>
4141
#include <txmempool.h>
42+
#include <txmempool_entry.h>
4243
#include <uint256.h>
4344
#include <univalue.h>
4445
#include <util/check.h>

src/policy/fees.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
#include <streams.h>
1717
#include <sync.h>
1818
#include <tinyformat.h>
19-
#include <txmempool.h>
19+
#include <txmempool_entry.h>
2020
#include <uint256.h>
2121
#include <util/serfloat.h>
2222
#include <util/system.h>

src/policy/rbf.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#include <sync.h>
1111
#include <tinyformat.h>
1212
#include <txmempool.h>
13+
#include <txmempool_entry.h>
1314
#include <uint256.h>
1415
#include <util/moneystr.h>
1516
#include <util/rbf.h>

src/rpc/mempool.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
#include <rpc/server_util.h>
1919
#include <rpc/util.h>
2020
#include <txmempool.h>
21+
#include <txmempool_entry.h>
2122
#include <univalue.h>
2223
#include <util/moneystr.h>
2324
#include <util/time.h>

src/test/fuzz/policy_estimator.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#include <test/fuzz/util/mempool.h>
1212
#include <test/util/setup_common.h>
1313
#include <txmempool.h>
14+
#include <txmempool_entry.h>
1415

1516
#include <cstdint>
1617
#include <optional>

0 commit comments

Comments
 (0)