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.
This commit is contained in:
Ryan Ofsky
2023-12-07 17:11:27 -05:00
parent 680eafdc74
commit 4d05d3f3b4
26 changed files with 48 additions and 8 deletions

View File

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

View File

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