diff options
author | Cory Fields <cory-nospam-@coryfields.com> | 2022-10-04 18:15:53 +0000 |
---|---|---|
committer | Cory Fields <cory-nospam-@coryfields.com> | 2022-10-04 21:21:05 +0000 |
commit | 43b8777dc3e63f4a1b20a3cb23e44c1b9e32862b (patch) | |
tree | 8e24f0c3bfcb8bd02029a761c08ceba6c3cc0ba3 | |
parent | 192325a77d593e404e74ef5e204aed8801b4e66f (diff) | |
download | bitcoin-43b8777dc3e63f4a1b20a3cb23e44c1b9e32862b.tar.xz |
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."
-rw-r--r-- | src/Makefile.am | 6 | ||||
-rw-r--r-- | src/common/run_command.cpp (renamed from src/util/run_command.cpp) | 2 | ||||
-rw-r--r-- | src/common/run_command.h (renamed from src/util/run_command.h) | 6 | ||||
-rw-r--r-- | src/external_signer.cpp | 2 | ||||
-rw-r--r-- | src/test/system_tests.cpp | 2 |
5 files changed, 9 insertions, 9 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index f5cf8cbca5..592f06aec6 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -133,6 +133,7 @@ BITCOIN_CORE_H = \ clientversion.h \ coins.h \ common/bloom.h \ + common/run_command.h \ compat/assumptions.h \ compat/byteswap.h \ compat/compat.h \ @@ -284,7 +285,6 @@ BITCOIN_CORE_H = \ util/rbf.h \ util/readwritefile.h \ util/result.h \ - util/run_command.h \ util/serfloat.h \ util/settings.h \ util/sock.h \ @@ -617,7 +617,7 @@ libbitcoin_consensus_a_SOURCES = \ version.h # common: shared between bitcoind, and bitcoin-qt and non-server tools -libbitcoin_common_a_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) +libbitcoin_common_a_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) $(BOOST_CPPFLAGS) libbitcoin_common_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS) libbitcoin_common_a_SOURCES = \ base58.cpp \ @@ -625,6 +625,7 @@ libbitcoin_common_a_SOURCES = \ chainparams.cpp \ coins.cpp \ common/bloom.cpp \ + common/run_command.cpp \ compressor.cpp \ core_read.cpp \ core_write.cpp \ @@ -681,7 +682,6 @@ libbitcoin_util_a_SOURCES = \ util/fees.cpp \ util/getuniquepath.cpp \ util/hasher.cpp \ - util/run_command.cpp \ util/sock.cpp \ util/syserror.cpp \ util/system.cpp \ diff --git a/src/util/run_command.cpp b/src/common/run_command.cpp index 90d677f512..6ad9f75b5d 100644 --- a/src/util/run_command.cpp +++ b/src/common/run_command.cpp @@ -6,7 +6,7 @@ #include <config/bitcoin-config.h> #endif -#include <util/run_command.h> +#include <common/run_command.h> #include <tinyformat.h> #include <univalue.h> diff --git a/src/util/run_command.h b/src/common/run_command.h index afe5d831c6..2fbdc071ee 100644 --- a/src/util/run_command.h +++ b/src/common/run_command.h @@ -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_UTIL_RUN_COMMAND_H -#define BITCOIN_UTIL_RUN_COMMAND_H +#ifndef BITCOIN_COMMON_RUN_COMMAND_H +#define BITCOIN_COMMON_RUN_COMMAND_H #include <string> @@ -18,4 +18,4 @@ class UniValue; */ UniValue RunCommandParseJSON(const std::string& str_command, const std::string& str_std_in=""); -#endif // BITCOIN_UTIL_RUN_COMMAND_H +#endif // BITCOIN_COMMON_RUN_COMMAND_H diff --git a/src/external_signer.cpp b/src/external_signer.cpp index d1eec2fd61..0e582629f7 100644 --- a/src/external_signer.cpp +++ b/src/external_signer.cpp @@ -3,9 +3,9 @@ // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include <chainparams.h> +#include <common/run_command.h> #include <core_io.h> #include <psbt.h> -#include <util/run_command.h> #include <util/strencodings.h> #include <external_signer.h> diff --git a/src/test/system_tests.cpp b/src/test/system_tests.cpp index ae6800c67c..11f4be7fef 100644 --- a/src/test/system_tests.cpp +++ b/src/test/system_tests.cpp @@ -3,7 +3,7 @@ // file COPYING or http://www.opensource.org/licenses/mit-license.php. // #include <test/util/setup_common.h> -#include <util/run_command.h> +#include <common/run_command.h> #include <univalue.h> #ifdef ENABLE_EXTERNAL_SIGNER |