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

@@ -34,12 +34,14 @@
class JSONRPCRequest;
enum ServiceFlags : uint64_t;
enum class OutputType;
enum class TransactionError;
struct FlatSigningProvider;
struct bilingual_str;
namespace common {
enum class PSBTError;
} // namespace common
namespace node {
enum class TransactionError;
} // namespace node
static constexpr bool DEFAULT_RPC_DOC_CHECK{
#ifdef RPC_DOC_CHECK
@@ -130,9 +132,9 @@ int ParseSighashString(const UniValue& sighash);
//! Parse a confirm target option and raise an RPC error if it is invalid.
unsigned int ParseConfirmTarget(const UniValue& value, unsigned int max_target);
RPCErrorCode RPCErrorFromTransactionError(TransactionError terr);
RPCErrorCode RPCErrorFromTransactionError(node::TransactionError terr);
UniValue JSONRPCPSBTError(common::PSBTError err);
UniValue JSONRPCTransactionError(TransactionError terr, const std::string& err_string = "");
UniValue JSONRPCTransactionError(node::TransactionError terr, const std::string& err_string = "");
//! Parse a JSON range specified as int64, or [int64, int64]
std::pair<int64_t, int64_t> ParseDescriptorRange(const UniValue& value);