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."
This commit is contained in:
Cory Fields 2022-10-04 18:15:53 +00:00
parent 192325a77d
commit 43b8777dc3
5 changed files with 9 additions and 9 deletions

View file

@ -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 \

View file

@ -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>

View file

@ -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

View file

@ -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>

View file

@ -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