mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-03 01:33:20 +02:00
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:
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user