Skip to content

Commit 75bbe59

Browse files
committed
refactor: Move CTxMemPoolEntry class to its own module
This change nukes the policy/fees->mempool circular dependency. Easy to review using `diff --color-moved=dimmed-zebra`.
1 parent 3f1f5f6 commit 75bbe59

19 files changed

+209
-160
lines changed

src/Makefile.am

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,7 @@ BITCOIN_CORE_H = \
261261
torcontrol.h \
262262
txdb.h \
263263
txmempool.h \
264+
txmempool_entry.h \
264265
txorphanage.h \
265266
txrequest.h \
266267
undo.h \
@@ -425,6 +426,7 @@ libbitcoin_node_a_SOURCES = \
425426
torcontrol.cpp \
426427
txdb.cpp \
427428
txmempool.cpp \
429+
txmempool_entry.cpp \
428430
txorphanage.cpp \
429431
txrequest.cpp \
430432
validation.cpp \
@@ -930,6 +932,7 @@ libbitcoinkernel_la_SOURCES = \
930932
threadinterrupt.cpp \
931933
txdb.cpp \
932934
txmempool.cpp \
935+
txmempool_entry.cpp \
933936
uint256.cpp \
934937
util/check.cpp \
935938
util/getuniquepath.cpp \

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
@@ -33,6 +33,7 @@
3333
#include <timedata.h>
3434
#include <tinyformat.h>
3535
#include <txmempool.h>
36+
#include <txmempool_entry.h>
3637
#include <txorphanage.h>
3738
#include <txrequest.h>
3839
#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
@@ -37,6 +37,7 @@
3737
#include <support/allocators/secure.h>
3838
#include <sync.h>
3939
#include <txmempool.h>
40+
#include <txmempool_entry.h>
4041
#include <uint256.h>
4142
#include <univalue.h>
4243
#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)