diff options
author | Ryan Ofsky <ryan@ofsky.org> | 2023-12-07 17:11:27 -0500 |
---|---|---|
committer | Ryan Ofsky <ryan@ofsky.org> | 2024-05-16 10:16:08 -0500 |
commit | 4d05d3f3b42a41525aa6ec44b90f543dfab53ecf (patch) | |
tree | 91b4256b9154bfb5b8d65ea22b6544a5f1bc8d1f /src/common | |
parent | 680eafdc74021c1e0893c3a62404e607fd4724f5 (diff) |
util: add TransactionError includes and namespace declarations
Add TransactionError to node namespace and include it directly instead of
relying on indirect include through common/messages.h
This is a followup to a previous commit which moved the TransactionError enum.
These changes were done in a separate followup just to keep the previous commit
more minimal and easy to review.
Diffstat (limited to 'src/common')
-rw-r--r-- | src/common/messages.cpp | 3 | ||||
-rw-r--r-- | src/common/messages.h | 6 |
2 files changed, 7 insertions, 2 deletions
diff --git a/src/common/messages.cpp b/src/common/messages.cpp index 5d68eb3d7f..c547ccb59d 100644 --- a/src/common/messages.cpp +++ b/src/common/messages.cpp @@ -7,6 +7,7 @@ #include <common/types.h> #include <policy/fees.h> +#include <node/types.h> #include <tinyformat.h> #include <util/strencodings.h> #include <util/string.h> @@ -18,6 +19,8 @@ #include <utility> #include <vector> +using node::TransactionError; + namespace common { std::string StringForFeeReason(FeeReason reason) { diff --git a/src/common/messages.h b/src/common/messages.h index bdd853791d..68e7bb2169 100644 --- a/src/common/messages.h +++ b/src/common/messages.h @@ -11,13 +11,15 @@ #ifndef BITCOIN_COMMON_MESSAGES_H #define BITCOIN_COMMON_MESSAGES_H -#include <node/types.h> #include <string> struct bilingual_str; enum class FeeEstimateMode; enum class FeeReason; +namespace node { +enum class TransactionError; +} // namespace node namespace common { enum class PSBTError; @@ -26,7 +28,7 @@ std::string StringForFeeReason(FeeReason reason); std::string FeeModes(const std::string& delimiter); std::string InvalidEstimateModeErrorMessage(); bilingual_str PSBTErrorString(PSBTError error); -bilingual_str TransactionErrorString(const TransactionError error); +bilingual_str TransactionErrorString(const node::TransactionError error); bilingual_str ResolveErrMsg(const std::string& optname, const std::string& strBind); bilingual_str InvalidPortErrMsg(const std::string& optname, const std::string& strPort); bilingual_str AmountHighWarn(const std::string& optname); |