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/rpc | |
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/rpc')
-rw-r--r-- | src/rpc/fees.cpp | 5 | ||||
-rw-r--r-- | src/rpc/util.cpp | 3 |
2 files changed, 7 insertions, 1 deletions
diff --git a/src/rpc/fees.cpp b/src/rpc/fees.cpp index b933d8c647..d74d77299f 100644 --- a/src/rpc/fees.cpp +++ b/src/rpc/fees.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/messages.h> #include <core_io.h> #include <node/context.h> #include <policy/feerate.h> @@ -14,7 +15,6 @@ #include <rpc/util.h> #include <txmempool.h> #include <univalue.h> -#include <util/fees.h> #include <validationinterface.h> #include <algorithm> @@ -22,6 +22,9 @@ #include <cmath> #include <string> +using common::FeeModeFromString; +using common::FeeModes; +using common::InvalidEstimateModeErrorMessage; using node::NodeContext; static RPCHelpMan estimatesmartfee() diff --git a/src/rpc/util.cpp b/src/rpc/util.cpp index 9ae6dd98e9..f1cff640fa 100644 --- a/src/rpc/util.cpp +++ b/src/rpc/util.cpp @@ -7,6 +7,7 @@ #include <clientversion.h> #include <core_io.h> #include <common/args.h> +#include <common/messages.h> #include <common/types.h> #include <consensus/amount.h> #include <script/interpreter.h> @@ -32,6 +33,8 @@ #include <utility> using common::PSBTError; +using common::PSBTErrorString; +using common::TransactionErrorString; const std::string UNIX_EPOCH_TIME = "UNIX epoch time"; const std::string EXAMPLE_ADDRESS[2] = {"bc1q09vm5lfy0j5reeulh4x5752q25uqqvz34hufdl", "bc1q02ad21edsxd23d32dfgqqsz4vv4nmtfzuklhy3"}; |