Skip to content

Commit

Permalink
refactor: Move txmempool_entry.h --> kernel/mempool_entry.h
Browse files Browse the repository at this point in the history
  • Loading branch information
hebasto committed Nov 30, 2022
1 parent 3be2106 commit 38941a7
Show file tree
Hide file tree
Showing 16 changed files with 20 additions and 20 deletions.
2 changes: 1 addition & 1 deletion src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ BITCOIN_CORE_H = \
kernel/checks.h \
kernel/coinstats.h \
kernel/context.h \
kernel/mempool_entry.h \
kernel/mempool_limits.h \
kernel/mempool_options.h \
kernel/mempool_persist.h \
Expand Down Expand Up @@ -263,7 +264,6 @@ BITCOIN_CORE_H = \
torcontrol.h \
txdb.h \
txmempool.h \
txmempool_entry.h \
txorphanage.h \
txrequest.h \
undo.h \
Expand Down
2 changes: 1 addition & 1 deletion src/bench/mempool_eviction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

#include <bench/bench.h>
#include <kernel/mempool_entry.h>
#include <policy/policy.h>
#include <test/util/setup_common.h>
#include <txmempool.h>
#include <txmempool_entry.h>


static void AddTx(const CTransactionRef& tx, const CAmount& nFee, CTxMemPool& pool) EXCLUSIVE_LOCKS_REQUIRED(cs_main, pool.cs)
Expand Down
2 changes: 1 addition & 1 deletion src/bench/mempool_stress.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

#include <bench/bench.h>
#include <kernel/mempool_entry.h>
#include <policy/policy.h>
#include <test/util/setup_common.h>
#include <txmempool.h>
#include <txmempool_entry.h>
#include <validation.h>

#include <vector>
Expand Down
2 changes: 1 addition & 1 deletion src/bench/rpc_mempool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

#include <bench/bench.h>
#include <chainparamsbase.h>
#include <kernel/mempool_entry.h>
#include <rpc/mempool.h>
#include <test/util/setup_common.h>
#include <txmempool.h>
#include <txmempool_entry.h>

#include <univalue.h>

Expand Down
6 changes: 3 additions & 3 deletions src/txmempool_entry.h → src/kernel/mempool_entry.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

#ifndef BITCOIN_TXMEMPOOL_ENTRY_H
#define BITCOIN_TXMEMPOOL_ENTRY_H
#ifndef BITCOIN_KERNEL_MEMPOOL_ENTRY_H
#define BITCOIN_KERNEL_MEMPOOL_ENTRY_H

#include <consensus/amount.h>
#include <consensus/validation.h>
Expand Down Expand Up @@ -171,4 +171,4 @@ class CTxMemPoolEntry
mutable Epoch::Marker m_epoch_marker; //!< epoch when last touched, useful for graph algorithms
};

#endif // BITCOIN_TXMEMPOOL_ENTRY_H
#endif // BITCOIN_KERNEL_MEMPOOL_ENTRY_H
2 changes: 1 addition & 1 deletion src/net_processing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#include <hash.h>
#include <headerssync.h>
#include <index/blockfilterindex.h>
#include <kernel/mempool_entry.h>
#include <merkleblock.h>
#include <netbase.h>
#include <netmessagemaker.h>
Expand All @@ -34,7 +35,6 @@
#include <timedata.h>
#include <tinyformat.h>
#include <txmempool.h>
#include <txmempool_entry.h>
#include <txorphanage.h>
#include <txrequest.h>
#include <util/check.h> // For NDEBUG compile time check
Expand Down
6 changes: 3 additions & 3 deletions src/node/interfaces.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,18 @@
#include <interfaces/handler.h>
#include <interfaces/node.h>
#include <interfaces/wallet.h>
#include <kernel/chain.h>
#include <kernel/mempool_entry.h>
#include <mapport.h>
#include <net.h>
#include <net_processing.h>
#include <netaddress.h>
#include <netbase.h>
#include <node/blockstorage.h>
#include <kernel/chain.h>
#include <node/coin.h>
#include <node/context.h>
#include <node/transaction.h>
#include <node/interface_ui.h>
#include <node/transaction.h>
#include <policy/feerate.h>
#include <policy/fees.h>
#include <policy/policy.h>
Expand All @@ -39,7 +40,6 @@
#include <support/allocators/secure.h>
#include <sync.h>
#include <txmempool.h>
#include <txmempool_entry.h>
#include <uint256.h>
#include <univalue.h>
#include <util/check.h>
Expand Down
2 changes: 1 addition & 1 deletion src/policy/fees.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include <clientversion.h>
#include <consensus/amount.h>
#include <fs.h>
#include <kernel/mempool_entry.h>
#include <logging.h>
#include <policy/feerate.h>
#include <primitives/transaction.h>
Expand All @@ -16,7 +17,6 @@
#include <streams.h>
#include <sync.h>
#include <tinyformat.h>
#include <txmempool_entry.h>
#include <uint256.h>
#include <util/serfloat.h>
#include <util/system.h>
Expand Down
2 changes: 1 addition & 1 deletion src/policy/rbf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
#include <policy/rbf.h>

#include <consensus/amount.h>
#include <kernel/mempool_entry.h>
#include <policy/feerate.h>
#include <primitives/transaction.h>
#include <sync.h>
#include <tinyformat.h>
#include <txmempool.h>
#include <txmempool_entry.h>
#include <uint256.h>
#include <util/moneystr.h>
#include <util/rbf.h>
Expand Down
2 changes: 1 addition & 1 deletion src/rpc/mempool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include <chainparams.h>
#include <core_io.h>
#include <fs.h>
#include <kernel/mempool_entry.h>
#include <node/mempool_persist_args.h>
#include <policy/rbf.h>
#include <policy/settings.h>
Expand All @@ -18,7 +19,6 @@
#include <rpc/server_util.h>
#include <rpc/util.h>
#include <txmempool.h>
#include <txmempool_entry.h>
#include <univalue.h>
#include <util/moneystr.h>
#include <util/time.h>
Expand Down
2 changes: 1 addition & 1 deletion src/test/fuzz/policy_estimator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

#include <kernel/mempool_entry.h>
#include <policy/fees.h>
#include <policy/fees_args.h>
#include <primitives/transaction.h>
Expand All @@ -11,7 +12,6 @@
#include <test/fuzz/util/mempool.h>
#include <test/util/setup_common.h>
#include <txmempool.h>
#include <txmempool_entry.h>

#include <cstdint>
#include <optional>
Expand Down
2 changes: 1 addition & 1 deletion src/test/fuzz/util/mempool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@

#include <consensus/amount.h>
#include <consensus/consensus.h>
#include <kernel/mempool_entry.h>
#include <primitives/transaction.h>
#include <test/fuzz/FuzzedDataProvider.h>
#include <test/fuzz/util.h>
#include <test/fuzz/util/mempool.h>
#include <txmempool_entry.h>

#include <cassert>
#include <cstdint>
Expand Down
2 changes: 1 addition & 1 deletion src/test/fuzz/util/mempool.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#ifndef BITCOIN_TEST_FUZZ_UTIL_MEMPOOL_H
#define BITCOIN_TEST_FUZZ_UTIL_MEMPOOL_H

#include <txmempool_entry.h>
#include <kernel/mempool_entry.h>
#include <validation.h>

class CTransaction;
Expand Down
2 changes: 1 addition & 1 deletion src/test/util/setup_common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include <init.h>
#include <init/common.h>
#include <interfaces/chain.h>
#include <kernel/mempool_entry.h>
#include <net.h>
#include <net_processing.h>
#include <node/blockstorage.h>
Expand All @@ -41,7 +42,6 @@
#include <timedata.h>
#include <txdb.h>
#include <txmempool.h>
#include <txmempool_entry.h>
#include <util/strencodings.h>
#include <util/string.h>
#include <util/thread.h>
Expand Down
2 changes: 1 addition & 1 deletion src/txmempool.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@
#include <coins.h>
#include <consensus/amount.h>
#include <indirectmap.h>
#include <kernel/mempool_entry.h>
#include <policy/feerate.h>
#include <policy/packages.h>
#include <primitives/transaction.h>
#include <random.h>
#include <sync.h>
#include <txmempool_entry.h>
#include <util/epochguard.h>
#include <util/hasher.h>

Expand Down
2 changes: 1 addition & 1 deletion src/validation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include <flatfile.h>
#include <fs.h>
#include <hash.h>
#include <kernel/mempool_entry.h>
#include <logging.h>
#include <logging/timer.h>
#include <node/blockstorage.h>
Expand All @@ -42,7 +43,6 @@
#include <tinyformat.h>
#include <txdb.h>
#include <txmempool.h>
#include <txmempool_entry.h>
#include <uint256.h>
#include <undo.h>
#include <util/check.h> // For NDEBUG compile time check
Expand Down

0 comments on commit 38941a7

Please sign in to comment.