Merge bitcoin/bitcoin#23517: scripted-diff: Move miner to src/node

fa4e09924b refactor: Replace validation.h include with forward-decl in miner.h (MarcoFalke)
fa0739a7d3 style: Sort file list after rename (MarcoFalke)
fa53e3a58c scripted-diff: Move miner to src/node (MarcoFalke)

Pull request description:

  It is impossible to run the miner without a node (validation, chainstate, mempool, rpc, ...). Also, the module is in the node library. Thus, it should be moved to `src/node`.

  Also, replace the `validation.h` include in the header with a forward-declaration.

ACKs for top commit:
  theStack:
    Code-review ACK fa4e09924b

Tree-SHA512: 791e6caa5839d8dc83b0f58f3f49bc0a7e3c1710822e8a44dede254c87b6f7531a0586fb95e8a067c181457a3895ad6041718aa2a2fac64cfc136bf04bb851d5
This commit is contained in:
MarcoFalke 2021-11-26 09:03:34 +01:00
commit 16d698cdcf
No known key found for this signature in database
GPG Key ID: CE2B75697E69A548
12 changed files with 18 additions and 17 deletions

View File

@ -166,7 +166,6 @@ BITCOIN_CORE_H = \
mapport.h \
memusage.h \
merkleblock.h \
miner.h \
net.h \
net_permissions.h \
net_processing.h \
@ -178,6 +177,7 @@ BITCOIN_CORE_H = \
node/coin.h \
node/coinstats.h \
node/context.h \
node/miner.h \
node/minisketchwrapper.h \
node/psbt.h \
node/transaction.h \
@ -335,7 +335,6 @@ libbitcoin_server_a_SOURCES = \
index/txindex.cpp \
init.cpp \
mapport.cpp \
miner.cpp \
net.cpp \
net_processing.cpp \
node/blockstorage.cpp \
@ -343,6 +342,7 @@ libbitcoin_server_a_SOURCES = \
node/coinstats.cpp \
node/context.cpp \
node/interfaces.cpp \
node/miner.cpp \
node/minisketchwrapper.cpp \
node/psbt.cpp \
node/transaction.cpp \

View File

@ -29,13 +29,13 @@
#include <interfaces/init.h>
#include <interfaces/node.h>
#include <mapport.h>
#include <miner.h>
#include <net.h>
#include <net_permissions.h>
#include <net_processing.h>
#include <netbase.h>
#include <node/blockstorage.h>
#include <node/context.h>
#include <node/miner.h>
#include <node/ui_interface.h>
#include <policy/feerate.h>
#include <policy/fees.h>

View File

@ -3,7 +3,7 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <miner.h>
#include <node/miner.h>
#include <chain.h>
#include <chainparams.h>
@ -21,6 +21,7 @@
#include <timedata.h>
#include <util/moneystr.h>
#include <util/system.h>
#include <validation.h>
#include <algorithm>
#include <utility>

View File

@ -3,20 +3,20 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#ifndef BITCOIN_MINER_H
#define BITCOIN_MINER_H
#ifndef BITCOIN_NODE_MINER_H
#define BITCOIN_NODE_MINER_H
#include <primitives/block.h>
#include <txmempool.h>
#include <validation.h>
#include <memory>
#include <optional>
#include <stdint.h>
#include <boost/multi_index_container.hpp>
#include <boost/multi_index/ordered_index.hpp>
#include <boost/multi_index_container.hpp>
class ChainstateManager;
class CBlockIndex;
class CChainParams;
class CScript;
@ -205,4 +205,4 @@ int64_t UpdateTime(CBlockHeader* pblock, const Consensus::Params& consensusParam
/** Update an old GenerateCoinbaseCommitment from CreateNewBlock after the block txs have changed */
void RegenerateCommitments(CBlock& block, ChainstateManager& chainman);
#endif // BITCOIN_MINER_H
#endif // BITCOIN_NODE_MINER_H

View File

@ -13,9 +13,9 @@
#include <deploymentinfo.h>
#include <deploymentstatus.h>
#include <key_io.h>
#include <miner.h>
#include <net.h>
#include <node/context.h>
#include <node/miner.h>
#include <policy/fees.h>
#include <pow.h>
#include <rpc/blockchain.h>

View File

@ -6,7 +6,7 @@
#include <chainparams.h>
#include <consensus/validation.h>
#include <index/blockfilterindex.h>
#include <miner.h>
#include <node/miner.h>
#include <pow.h>
#include <script/standard.h>
#include <test/util/blockfilter.h>

View File

@ -3,7 +3,7 @@
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <consensus/validation.h>
#include <miner.h>
#include <node/miner.h>
#include <test/fuzz/FuzzedDataProvider.h>
#include <test/fuzz/fuzz.h>
#include <test/fuzz/util.h>

View File

@ -7,7 +7,7 @@
#include <consensus/consensus.h>
#include <consensus/merkle.h>
#include <consensus/tx_verify.h>
#include <miner.h>
#include <node/miner.h>
#include <policy/policy.h>
#include <script/standard.h>
#include <txmempool.h>

View File

@ -7,8 +7,8 @@
#include <chainparams.h>
#include <consensus/merkle.h>
#include <key_io.h>
#include <miner.h>
#include <node/context.h>
#include <node/miner.h>
#include <pow.h>
#include <script/standard.h>
#include <test/util/script.h>

View File

@ -13,9 +13,9 @@
#include <crypto/sha256.h>
#include <init.h>
#include <interfaces/chain.h>
#include <miner.h>
#include <net.h>
#include <net_processing.h>
#include <node/miner.h>
#include <noui.h>
#include <policy/fees.h>
#include <pow.h>

View File

@ -7,7 +7,7 @@
#include <chainparams.h>
#include <consensus/merkle.h>
#include <consensus/validation.h>
#include <miner.h>
#include <node/miner.h>
#include <pow.h>
#include <random.h>
#include <script/standard.h>

View File

@ -88,7 +88,7 @@ implicit-signed-integer-truncation:chain.h
implicit-signed-integer-truncation:crypto/
implicit-signed-integer-truncation:cuckoocache.h
implicit-signed-integer-truncation:leveldb/
implicit-signed-integer-truncation:miner.cpp
implicit-signed-integer-truncation:node/miner.cpp
implicit-signed-integer-truncation:net.cpp
implicit-signed-integer-truncation:net_processing.cpp
implicit-signed-integer-truncation:streams.h