From 0b65f1d2416bf77d4ba5385c59c06fa793ff7af6 Mon Sep 17 00:00:00 2001 From: Kittywhiskers Van Gogh <63189531+kwvg@users.noreply.github.com> Date: Fri, 25 Oct 2024 21:35:20 +0000 Subject: [PATCH] merge bitcoin#23517: Move miner to src/node --- src/Makefile.am | 4 ++-- src/init.cpp | 2 +- src/{ => node}/miner.cpp | 4 ++-- src/{ => node}/miner.h | 6 +++--- src/rpc/mining.cpp | 2 +- src/test/block_reward_reallocation_tests.cpp | 2 +- src/test/blockfilter_index_tests.cpp | 2 +- src/test/dynamic_activation_thresholds_tests.cpp | 2 +- src/test/fuzz/tx_pool.cpp | 2 +- src/test/miner_tests.cpp | 2 +- src/test/util/mining.cpp | 2 +- src/test/util/setup_common.cpp | 2 +- src/test/validation_block_tests.cpp | 2 +- 13 files changed, 17 insertions(+), 17 deletions(-) rename src/{ => node}/miner.cpp (99%) rename src/{ => node}/miner.h (98%) diff --git a/src/Makefile.am b/src/Makefile.am index 170c900961..38f51fada8 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -258,7 +258,6 @@ BITCOIN_CORE_H = \ memusage.h \ merkleblock.h \ messagesigner.h \ - miner.h \ minisketchwrapper.h \ net.h \ net_permissions.h \ @@ -275,6 +274,7 @@ BITCOIN_CORE_H = \ node/connection_types.h \ node/context.h \ node/eviction.h \ + node/miner.h \ node/psbt.h \ node/transaction.h \ node/ui_interface.h \ @@ -494,7 +494,6 @@ libbitcoin_server_a_SOURCES = \ masternode/payments.cpp \ masternode/sync.cpp \ masternode/utils.cpp \ - miner.cpp \ minisketchwrapper.cpp \ net.cpp \ netfulfilledman.cpp \ @@ -507,6 +506,7 @@ libbitcoin_server_a_SOURCES = \ node/context.cpp \ node/eviction.cpp \ node/interfaces.cpp \ + node/miner.cpp \ node/psbt.cpp \ node/transaction.cpp \ node/ui_interface.cpp \ diff --git a/src/init.cpp b/src/init.cpp index bdcc8296d4..4524a33d84 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -31,7 +31,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/miner.cpp b/src/node/miner.cpp similarity index 99% rename from src/miner.cpp rename to src/node/miner.cpp index f25c6865e6..1b973a60f2 100644 --- a/src/miner.cpp +++ b/src/node/miner.cpp @@ -4,7 +4,7 @@ // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. -#include +#include #include #include @@ -22,6 +22,7 @@ #include #include #include +#include #include #include @@ -37,7 +38,6 @@ #include #include #include -#include #include #include diff --git a/src/miner.h b/src/node/miner.h similarity index 98% rename from src/miner.h rename to src/node/miner.h index 287d06eb88..03ec8ac1dc 100644 --- a/src/miner.h +++ b/src/node/miner.h @@ -3,8 +3,8 @@ // 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 #include @@ -234,4 +234,4 @@ private: void IncrementExtraNonce(CBlock* pblock, const CBlockIndex* pindexPrev, unsigned int& nExtraNonce); int64_t UpdateTime(CBlockHeader* pblock, const Consensus::Params& consensusParams, const CBlockIndex* pindexPrev); -#endif // BITCOIN_MINER_H +#endif // BITCOIN_NODE_MINER_H diff --git a/src/rpc/mining.cpp b/src/rpc/mining.cpp index 2a6bbd6f1f..8ef95e0633 100644 --- a/src/rpc/mining.cpp +++ b/src/rpc/mining.cpp @@ -19,9 +19,9 @@ #include #include #include -#include #include #include +#include #include #include #include diff --git a/src/test/block_reward_reallocation_tests.cpp b/src/test/block_reward_reallocation_tests.cpp index 3c78438bf9..12546ec1d5 100644 --- a/src/test/block_reward_reallocation_tests.cpp +++ b/src/test/block_reward_reallocation_tests.cpp @@ -9,8 +9,8 @@ #include #include #include -#include #include +#include #include