Skip to content

Commit 669af32

Browse files
committed
Merge bitcoin/bitcoin#27419: move-only: Extract common/args from util/system
be55f54 move-only: Extract common/args and common/config.cpp from util/system (TheCharlatan) Pull request description: This pull request is part of the `libbitcoinkernel` project bitcoin/bitcoin#24303 https://github.com/bitcoin/bitcoin/projects/18 and more specifically its "Step 2: Decouple most non-consensus code from libbitcoinkernel". It is part of a series of patches splitting up the `util/system` files. Its preceding pull request is bitcoin/bitcoin#27254. The pull request contains an extraction of ArgsManager related functions from util/system into their own common/ file. The background of this commit is an ongoing effort to decouple the libbitcoinkernel library from the ArgsManager. The ArgsManager belongs into the common library, since the kernel library should not depend on it. See [doc/design/libraries.md](https://github.com/bitcoin/bitcoin/blob/master/doc/design/libraries.md) for more information on this rationale. ACKs for top commit: MarcoFalke: re-ACK be55f54 🚲 ryanofsky: Code review ACK be55f54. Just small cleanups since the last review. hebasto: ACK be55f54, I have reviewed the code and it looks OK, I agree it can be merged. Tree-SHA512: 90eb03334af0155b823030b4f2ecf286d35058d700ee2ddbbaa445be19e31eb0fe982656f35bd14ecee3ad2c3d0db3746855cb8f3777eff7253713e42873e111
2 parents 4c40837 + be55f54 commit 669af32

File tree

113 files changed

+1655
-1545
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

113 files changed

+1655
-1545
lines changed

ci/test/06_script_b.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ if [ "${RUN_TIDY}" = "true" ]; then
4242
( CI_EXEC run-clang-tidy-16 -quiet "${MAKEJOBS}" ) | grep -C5 "error"
4343
export P_CI_DIR="${BASE_BUILD_DIR}/bitcoin-$HOST/"
4444
CI_EXEC "python3 ${DIR_IWYU}/include-what-you-use/iwyu_tool.py"\
45+
" src/common/args.cpp"\
46+
" src/common/config.cpp"\
4547
" src/common/init.cpp"\
4648
" src/common/url.cpp"\
4749
" src/compat"\

src/Makefile.am

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ BITCOIN_CORE_H = \
133133
checkqueue.h \
134134
clientversion.h \
135135
coins.h \
136+
common/args.h \
136137
common/bloom.h \
137138
common/init.h \
138139
common/run_command.h \
@@ -647,7 +648,9 @@ libbitcoin_common_a_SOURCES = \
647648
bech32.cpp \
648649
chainparams.cpp \
649650
coins.cpp \
651+
common/args.cpp \
650652
common/bloom.cpp \
653+
common/config.cpp \
651654
common/init.cpp \
652655
common/interfaces.cpp \
653656
common/run_command.cpp \
@@ -902,6 +905,8 @@ libbitcoinkernel_la_SOURCES = \
902905
chainparams.cpp \
903906
clientversion.cpp \
904907
coins.cpp \
908+
common/args.cpp \
909+
common/config.cpp \
905910
compressor.cpp \
906911
consensus/merkle.cpp \
907912
consensus/tx_check.cpp \

src/addrdb.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
#include <addrman.h>
99
#include <chainparams.h>
1010
#include <clientversion.h>
11+
#include <common/args.h>
1112
#include <cstdint>
1213
#include <hash.h>
1314
#include <logging.h>
@@ -21,7 +22,6 @@
2122
#include <util/fs.h>
2223
#include <util/fs_helpers.h>
2324
#include <util/settings.h>
24-
#include <util/system.h>
2525
#include <util/translation.h>
2626

2727
namespace {

src/banman.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
#include <banman.h>
77

8+
#include <logging.h>
89
#include <netaddress.h>
910
#include <node/interface_ui.h>
1011
#include <sync.h>

src/bench/bench_bitcoin.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
#include <bench/bench.h>
66

77
#include <clientversion.h>
8+
#include <common/args.h>
89
#include <crypto/sha256.h>
910
#include <util/fs.h>
1011
#include <util/strencodings.h>
11-
#include <util/system.h>
1212

1313
#include <chrono>
1414
#include <cstdint>

src/bench/checkblock.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
#include <bench/data.h>
77

88
#include <chainparams.h>
9+
#include <common/args.h>
910
#include <consensus/validation.h>
1011
#include <streams.h>
11-
#include <util/system.h>
1212
#include <validation.h>
1313

1414
// These are the two major time-sinks which happen after we have fully received

src/bitcoin-chainstate.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@
1717
#include <kernel/validation_cache_sizes.h>
1818

1919
#include <chainparams.h>
20+
#include <common/args.h>
2021
#include <consensus/validation.h>
2122
#include <core_io.h>
2223
#include <node/blockstorage.h>
2324
#include <node/caches.h>
2425
#include <node/chainstate.h>
2526
#include <scheduler.h>
2627
#include <script/sigcache.h>
27-
#include <util/system.h>
2828
#include <util/thread.h>
2929
#include <validation.h>
3030
#include <validationinterface.h>

src/bitcoin-cli.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
#include <chainparamsbase.h>
1111
#include <clientversion.h>
12+
#include <common/args.h>
1213
#include <common/url.h>
1314
#include <compat/compat.h>
1415
#include <compat/stdin.h>
@@ -22,6 +23,7 @@
2223
#include <util/exception.h>
2324
#include <util/strencodings.h>
2425
#include <util/system.h>
26+
#include <util/time.h>
2527
#include <util/translation.h>
2628

2729
#include <algorithm>
@@ -1228,7 +1230,7 @@ static int CommandLineRPC(int argc, char *argv[])
12281230
MAIN_FUNCTION
12291231
{
12301232
#ifdef WIN32
1231-
util::WinCmdLineArgs winArgs;
1233+
common::WinCmdLineArgs winArgs;
12321234
std::tie(argc, argv) = winArgs.get();
12331235
#endif
12341236
SetupEnvironment();

src/bitcoin-tx.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
#include <clientversion.h>
1010
#include <coins.h>
11+
#include <common/args.h>
1112
#include <compat/compat.h>
1213
#include <consensus/amount.h>
1314
#include <consensus/consensus.h>

src/bitcoin-util.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#include <chainparams.h>
1212
#include <chainparamsbase.h>
1313
#include <clientversion.h>
14+
#include <common/args.h>
1415
#include <compat/compat.h>
1516
#include <core_io.h>
1617
#include <streams.h>

0 commit comments

Comments
 (0)