Skip to content

Commit 43b8777

Browse files
committed
refactor: move run_command from util to common
Quoting ryanofsky: "util can be the library for things included in the kernel which the kernel can depend on, and common can be the library for other code that needs to be shared internally, but should not be part of the kernel or shared externally."
1 parent 192325a commit 43b8777

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

src/Makefile.am

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ BITCOIN_CORE_H = \
133133
clientversion.h \
134134
coins.h \
135135
common/bloom.h \
136+
common/run_command.h \
136137
compat/assumptions.h \
137138
compat/byteswap.h \
138139
compat/compat.h \
@@ -284,7 +285,6 @@ BITCOIN_CORE_H = \
284285
util/rbf.h \
285286
util/readwritefile.h \
286287
util/result.h \
287-
util/run_command.h \
288288
util/serfloat.h \
289289
util/settings.h \
290290
util/sock.h \
@@ -617,14 +617,15 @@ libbitcoin_consensus_a_SOURCES = \
617617
version.h
618618

619619
# common: shared between bitcoind, and bitcoin-qt and non-server tools
620-
libbitcoin_common_a_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES)
620+
libbitcoin_common_a_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) $(BOOST_CPPFLAGS)
621621
libbitcoin_common_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
622622
libbitcoin_common_a_SOURCES = \
623623
base58.cpp \
624624
bech32.cpp \
625625
chainparams.cpp \
626626
coins.cpp \
627627
common/bloom.cpp \
628+
common/run_command.cpp \
628629
compressor.cpp \
629630
core_read.cpp \
630631
core_write.cpp \
@@ -681,7 +682,6 @@ libbitcoin_util_a_SOURCES = \
681682
util/fees.cpp \
682683
util/getuniquepath.cpp \
683684
util/hasher.cpp \
684-
util/run_command.cpp \
685685
util/sock.cpp \
686686
util/syserror.cpp \
687687
util/system.cpp \

src/util/run_command.cpp renamed to src/common/run_command.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#include <config/bitcoin-config.h>
77
#endif
88

9-
#include <util/run_command.h>
9+
#include <common/run_command.h>
1010

1111
#include <tinyformat.h>
1212
#include <univalue.h>

src/util/run_command.h renamed to src/common/run_command.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
// Distributed under the MIT software license, see the accompanying
33
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
44

5-
#ifndef BITCOIN_UTIL_RUN_COMMAND_H
6-
#define BITCOIN_UTIL_RUN_COMMAND_H
5+
#ifndef BITCOIN_COMMON_RUN_COMMAND_H
6+
#define BITCOIN_COMMON_RUN_COMMAND_H
77

88
#include <string>
99

@@ -18,4 +18,4 @@ class UniValue;
1818
*/
1919
UniValue RunCommandParseJSON(const std::string& str_command, const std::string& str_std_in="");
2020

21-
#endif // BITCOIN_UTIL_RUN_COMMAND_H
21+
#endif // BITCOIN_COMMON_RUN_COMMAND_H

src/external_signer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
44

55
#include <chainparams.h>
6+
#include <common/run_command.h>
67
#include <core_io.h>
78
#include <psbt.h>
8-
#include <util/run_command.h>
99
#include <util/strencodings.h>
1010
#include <external_signer.h>
1111

src/test/system_tests.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
44
//
55
#include <test/util/setup_common.h>
6-
#include <util/run_command.h>
6+
#include <common/run_command.h>
77
#include <univalue.h>
88

99
#ifdef ENABLE_EXTERNAL_SIGNER

0 commit comments

Comments
 (0)