diff options
author | Ryan Ofsky <ryan@ofsky.org> | 2023-12-06 16:43:49 -0500 |
---|---|---|
committer | Ryan Ofsky <ryan@ofsky.org> | 2024-05-16 10:16:08 -0500 |
commit | 680eafdc74021c1e0893c3a62404e607fd4724f5 (patch) | |
tree | d1fe7bb7ad81db88b38d5af9081a0e5561ed9a11 /src/wallet | |
parent | 02e62c6c9af4beabaeea58fb1ea3ad0dc5094678 (diff) |
util: move fees.h and error.h to common/messages.h
Move enum and message formatting functions to a common/messages header where
they should be more discoverable, and also out of the util library, so they
will not be a dependency of the kernel
The are no changes in behavior and no changes to the moved code.
Diffstat (limited to 'src/wallet')
-rw-r--r-- | src/wallet/rpc/spend.cpp | 7 | ||||
-rw-r--r-- | src/wallet/scriptpubkeyman.h | 2 | ||||
-rw-r--r-- | src/wallet/spend.cpp | 4 | ||||
-rw-r--r-- | src/wallet/wallet.cpp | 4 |
4 files changed, 13 insertions, 4 deletions
diff --git a/src/wallet/rpc/spend.cpp b/src/wallet/rpc/spend.cpp index 12c59acadf..1143a79020 100644 --- a/src/wallet/rpc/spend.cpp +++ b/src/wallet/rpc/spend.cpp @@ -2,6 +2,7 @@ // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. +#include <common/messages.h> #include <consensus/validation.h> #include <core_io.h> #include <key_io.h> @@ -9,7 +10,6 @@ #include <rpc/rawtransaction_util.h> #include <rpc/util.h> #include <script/script.h> -#include <util/fees.h> #include <util/rbf.h> #include <util/translation.h> #include <util/vector.h> @@ -22,6 +22,11 @@ #include <univalue.h> +using common::FeeModeFromString; +using common::FeeModes; +using common::InvalidEstimateModeErrorMessage; +using common::StringForFeeReason; +using common::TransactionErrorString; namespace wallet { std::vector<CRecipient> CreateRecipients(const std::vector<std::pair<CTxDestination, CAmount>>& outputs, const std::set<int>& subtract_fee_outputs) diff --git a/src/wallet/scriptpubkeyman.h b/src/wallet/scriptpubkeyman.h index 470a73e6b3..5f8a32acc8 100644 --- a/src/wallet/scriptpubkeyman.h +++ b/src/wallet/scriptpubkeyman.h @@ -6,6 +6,7 @@ #define BITCOIN_WALLET_SCRIPTPUBKEYMAN_H #include <addresstype.h> +#include <common/messages.h> #include <common/signmessage.h> #include <common/types.h> #include <logging.h> @@ -13,7 +14,6 @@ #include <script/descriptor.h> #include <script/script.h> #include <script/signingprovider.h> -#include <util/error.h> #include <util/result.h> #include <util/time.h> #include <wallet/crypter.h> diff --git a/src/wallet/spend.cpp b/src/wallet/spend.cpp index 9a7e166e68..c47c9188cd 100644 --- a/src/wallet/spend.cpp +++ b/src/wallet/spend.cpp @@ -4,6 +4,7 @@ #include <algorithm> #include <common/args.h> +#include <common/messages.h> #include <common/system.h> #include <consensus/amount.h> #include <consensus/validation.h> @@ -15,7 +16,6 @@ #include <script/signingprovider.h> #include <script/solver.h> #include <util/check.h> -#include <util/fees.h> #include <util/moneystr.h> #include <util/rbf.h> #include <util/trace.h> @@ -29,6 +29,8 @@ #include <cmath> +using common::StringForFeeReason; +using common::TransactionErrorString; using interfaces::FoundBlock; namespace wallet { diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index f0c320fcff..429c986e0c 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -11,6 +11,7 @@ #include <chain.h> #include <coins.h> #include <common/args.h> +#include <common/messages.h> #include <common/settings.h> #include <common/signmessage.h> #include <common/system.h> @@ -50,7 +51,6 @@ #include <uint256.h> #include <univalue.h> #include <util/check.h> -#include <util/error.h> #include <util/fs.h> #include <util/fs_helpers.h> #include <util/moneystr.h> @@ -81,6 +81,8 @@ struct KeyOriginInfo; +using common::AmountErrMsg; +using common::AmountHighWarn; using common::PSBTError; using interfaces::FoundBlock; |