aboutsummaryrefslogtreecommitdiff
path: root/src/wallet
diff options
context:
space:
mode:
authorfanquake <fanquake@gmail.com>2023-04-21 11:04:26 +0100
committerfanquake <fanquake@gmail.com>2023-04-21 11:19:08 +0100
commit669af326329b01a739aa5ee79c2e8002818fa4cc (patch)
treec40fe3188f52938875b3404ee7dcbd232ab21db2 /src/wallet
parent4c40837a454996c9f704ebf060efd6b249f2e362 (diff)
parentbe55f545d53d44fdcf2d8ae802e9eae551d120c6 (diff)
downloadbitcoin-669af326329b01a739aa5ee79c2e8002818fa4cc.tar.xz
Merge bitcoin/bitcoin#27419: move-only: Extract common/args from util/system
be55f545d53d44fdcf2d8ae802e9eae551d120c6 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 https://github.com/bitcoin/bitcoin/issues/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 https://github.com/bitcoin/bitcoin/pull/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 be55f545d53d44fdcf2d8ae802e9eae551d120c6 🚲 ryanofsky: Code review ACK be55f545d53d44fdcf2d8ae802e9eae551d120c6. Just small cleanups since the last review. hebasto: ACK be55f545d53d44fdcf2d8ae802e9eae551d120c6, I have reviewed the code and it looks OK, I agree it can be merged. Tree-SHA512: 90eb03334af0155b823030b4f2ecf286d35058d700ee2ddbbaa445be19e31eb0fe982656f35bd14ecee3ad2c3d0db3746855cb8f3777eff7253713e42873e111
Diffstat (limited to 'src/wallet')
-rw-r--r--src/wallet/bdb.cpp3
-rw-r--r--src/wallet/bdb.h1
-rw-r--r--src/wallet/coincontrol.cpp2
-rw-r--r--src/wallet/coinselection.cpp3
-rw-r--r--src/wallet/db.cpp2
-rw-r--r--src/wallet/dump.cpp2
-rw-r--r--src/wallet/external_signer_scriptpubkeyman.cpp2
-rw-r--r--src/wallet/init.cpp2
-rw-r--r--src/wallet/interfaces.cpp2
-rw-r--r--src/wallet/load.cpp2
-rw-r--r--src/wallet/spend.cpp2
-rw-r--r--src/wallet/test/init_test_fixture.cpp2
-rw-r--r--src/wallet/test/init_tests.cpp2
-rw-r--r--src/wallet/wallet.cpp2
-rw-r--r--src/wallet/wallettool.cpp2
-rw-r--r--src/wallet/walletutil.cpp2
16 files changed, 21 insertions, 12 deletions
diff --git a/src/wallet/bdb.cpp b/src/wallet/bdb.cpp
index dd425c1160..4eab342495 100644
--- a/src/wallet/bdb.cpp
+++ b/src/wallet/bdb.cpp
@@ -4,10 +4,13 @@
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <compat/compat.h>
+#include <logging.h>
#include <util/fs.h>
+#include <util/time.h>
#include <wallet/bdb.h>
#include <wallet/db.h>
+#include <sync.h>
#include <util/check.h>
#include <util/fs_helpers.h>
#include <util/strencodings.h>
diff --git a/src/wallet/bdb.h b/src/wallet/bdb.h
index fbec0bb90b..ff24081696 100644
--- a/src/wallet/bdb.h
+++ b/src/wallet/bdb.h
@@ -14,6 +14,7 @@
#include <wallet/db.h>
#include <atomic>
+#include <condition_variable>
#include <map>
#include <memory>
#include <string>
diff --git a/src/wallet/coincontrol.cpp b/src/wallet/coincontrol.cpp
index 3b3c1f8da4..ad2fab4b7d 100644
--- a/src/wallet/coincontrol.cpp
+++ b/src/wallet/coincontrol.cpp
@@ -4,7 +4,7 @@
#include <wallet/coincontrol.h>
-#include <util/system.h>
+#include <common/args.h>
namespace wallet {
CCoinControl::CCoinControl()
diff --git a/src/wallet/coinselection.cpp b/src/wallet/coinselection.cpp
index f704d03b5f..832d24746f 100644
--- a/src/wallet/coinselection.cpp
+++ b/src/wallet/coinselection.cpp
@@ -6,10 +6,11 @@
#include <consensus/amount.h>
#include <consensus/consensus.h>
+#include <logging.h>
#include <policy/feerate.h>
#include <util/check.h>
-#include <util/system.h>
#include <util/moneystr.h>
+#include <util/system.h>
#include <numeric>
#include <optional>
diff --git a/src/wallet/db.cpp b/src/wallet/db.cpp
index 92e1d61ac4..0c24920516 100644
--- a/src/wallet/db.cpp
+++ b/src/wallet/db.cpp
@@ -4,9 +4,9 @@
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <chainparams.h>
+#include <common/args.h>
#include <logging.h>
#include <util/fs.h>
-#include <util/system.h>
#include <wallet/db.h>
#include <exception>
diff --git a/src/wallet/dump.cpp b/src/wallet/dump.cpp
index 31b6eb4ae1..865af0bb23 100644
--- a/src/wallet/dump.cpp
+++ b/src/wallet/dump.cpp
@@ -4,8 +4,8 @@
#include <wallet/dump.h>
+#include <common/args.h>
#include <util/fs.h>
-#include <util/system.h>
#include <util/translation.h>
#include <wallet/wallet.h>
diff --git a/src/wallet/external_signer_scriptpubkeyman.cpp b/src/wallet/external_signer_scriptpubkeyman.cpp
index cb861d835e..079e3baa4e 100644
--- a/src/wallet/external_signer_scriptpubkeyman.cpp
+++ b/src/wallet/external_signer_scriptpubkeyman.cpp
@@ -3,7 +3,9 @@
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <chainparams.h>
+#include <common/args.h>
#include <external_signer.h>
+#include <util/system.h>
#include <wallet/external_signer_scriptpubkeyman.h>
#include <iostream>
diff --git a/src/wallet/init.cpp b/src/wallet/init.cpp
index 5403e38950..0d0a8650ac 100644
--- a/src/wallet/init.cpp
+++ b/src/wallet/init.cpp
@@ -3,6 +3,7 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+#include <common/args.h>
#include <init.h>
#include <interfaces/chain.h>
#include <interfaces/init.h>
@@ -14,7 +15,6 @@
#include <univalue.h>
#include <util/check.h>
#include <util/moneystr.h>
-#include <util/system.h>
#include <util/translation.h>
#ifdef USE_BDB
#include <wallet/bdb.h>
diff --git a/src/wallet/interfaces.cpp b/src/wallet/interfaces.cpp
index 086f6d9de8..1cde4207e2 100644
--- a/src/wallet/interfaces.cpp
+++ b/src/wallet/interfaces.cpp
@@ -4,6 +4,7 @@
#include <interfaces/wallet.h>
+#include <common/args.h>
#include <consensus/amount.h>
#include <interfaces/chain.h>
#include <interfaces/handler.h>
@@ -15,7 +16,6 @@
#include <sync.h>
#include <uint256.h>
#include <util/check.h>
-#include <util/system.h>
#include <util/translation.h>
#include <util/ui_change_type.h>
#include <wallet/coincontrol.h>
diff --git a/src/wallet/load.cpp b/src/wallet/load.cpp
index 2103fc64e4..2560dda87c 100644
--- a/src/wallet/load.cpp
+++ b/src/wallet/load.cpp
@@ -5,12 +5,12 @@
#include <wallet/load.h>
+#include <common/args.h>
#include <interfaces/chain.h>
#include <scheduler.h>
#include <util/check.h>
#include <util/fs.h>
#include <util/string.h>
-#include <util/system.h>
#include <util/translation.h>
#include <wallet/context.h>
#include <wallet/spend.h>
diff --git a/src/wallet/spend.cpp b/src/wallet/spend.cpp
index c3303419d4..748f40dce8 100644
--- a/src/wallet/spend.cpp
+++ b/src/wallet/spend.cpp
@@ -3,6 +3,7 @@
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <algorithm>
+#include <common/args.h>
#include <consensus/amount.h>
#include <consensus/validation.h>
#include <interfaces/chain.h>
@@ -14,6 +15,7 @@
#include <util/fees.h>
#include <util/moneystr.h>
#include <util/rbf.h>
+#include <util/system.h>
#include <util/trace.h>
#include <util/translation.h>
#include <wallet/coincontrol.h>
diff --git a/src/wallet/test/init_test_fixture.cpp b/src/wallet/test/init_test_fixture.cpp
index 1db2a06bf8..0adc63876c 100644
--- a/src/wallet/test/init_test_fixture.cpp
+++ b/src/wallet/test/init_test_fixture.cpp
@@ -2,10 +2,10 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+#include <common/args.h>
#include <univalue.h>
#include <util/check.h>
#include <util/fs.h>
-#include <util/system.h>
#include <fstream>
#include <string>
diff --git a/src/wallet/test/init_tests.cpp b/src/wallet/test/init_tests.cpp
index 3dbc91fc68..10aeed49cb 100644
--- a/src/wallet/test/init_tests.cpp
+++ b/src/wallet/test/init_tests.cpp
@@ -4,10 +4,10 @@
#include <boost/test/unit_test.hpp>
+#include <common/args.h>
#include <noui.h>
#include <test/util/logging.h>
#include <test/util/setup_common.h>
-#include <util/system.h>
#include <wallet/test/init_test_fixture.h>
namespace wallet {
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp
index 4e8c0c0e5e..1095529188 100644
--- a/src/wallet/wallet.cpp
+++ b/src/wallet/wallet.cpp
@@ -7,6 +7,7 @@
#include <blockfilter.h>
#include <chain.h>
+#include <common/args.h>
#include <consensus/amount.h>
#include <consensus/consensus.h>
#include <consensus/validation.h>
@@ -36,7 +37,6 @@
#include <util/moneystr.h>
#include <util/rbf.h>
#include <util/string.h>
-#include <util/system.h>
#include <util/translation.h>
#include <wallet/coincontrol.h>
#include <wallet/context.h>
diff --git a/src/wallet/wallettool.cpp b/src/wallet/wallettool.cpp
index acd817a311..2f3f8ef77d 100644
--- a/src/wallet/wallettool.cpp
+++ b/src/wallet/wallettool.cpp
@@ -8,8 +8,8 @@
#include <wallet/wallettool.h>
+#include <common/args.h>
#include <util/fs.h>
-#include <util/system.h>
#include <util/translation.h>
#include <wallet/dump.h>
#include <wallet/salvage.h>
diff --git a/src/wallet/walletutil.cpp b/src/wallet/walletutil.cpp
index 299c74d01c..fdd5bc36d8 100644
--- a/src/wallet/walletutil.cpp
+++ b/src/wallet/walletutil.cpp
@@ -4,8 +4,8 @@
#include <wallet/walletutil.h>
+#include <common/args.h>
#include <logging.h>
-#include <util/system.h>
namespace wallet {
fs::path GetWalletDir()