Monero
Loading...
Searching...
No Matches
node_rpc_proxy.cpp File Reference
#include "node_rpc_proxy.h"
#include "rpc/core_rpc_server_commands_defs.h"
#include "rpc/rpc_payment_signature.h"
#include "rpc/rpc_payment_costs.h"
#include "storages/http_abstract_invoke.h"
#include <boost/thread.hpp>
Include dependency graph for node_rpc_proxy.cpp:

Namespaces

namespace  tools
 Various Tools.

Macros

#define RETURN_ON_RPC_RESPONSE_ERROR(r, error, res, method)

Variables

static const std::chrono::seconds tools::rpc_timeout = std::chrono::minutes(3) + std::chrono::seconds(30)

Macro Definition Documentation

◆ RETURN_ON_RPC_RESPONSE_ERROR

#define RETURN_ON_RPC_RESPONSE_ERROR ( r,
error,
res,
method )
Value:
do { \
CHECK_AND_ASSERT_MES(error.code == 0, error.message, error.message); \
handle_payment_changes(res, std::integral_constant<bool, HasCredits<decltype(res)>::Has>()); \
CHECK_AND_ASSERT_MES(r, std::string("Failed to connect to daemon"), "Failed to connect to daemon"); \
/* empty string -> not connection */ \
CHECK_AND_ASSERT_MES(!res.status.empty(), res.status, "No connection to daemon"); \
CHECK_AND_ASSERT_MES(res.status != CORE_RPC_STATUS_BUSY, res.status, "Daemon busy"); \
CHECK_AND_ASSERT_MES(res.status != CORE_RPC_STATUS_PAYMENT_REQUIRED, res.status, "Payment required"); \
CHECK_AND_ASSERT_MES(res.status == CORE_RPC_STATUS_OK, res.status, "Error calling " + std::string(method) + " daemon RPC"); \
} while(0)
#define CORE_RPC_STATUS_PAYMENT_REQUIRED
Definition core_rpc_server_commands_defs.h:81
#define CORE_RPC_STATUS_OK
Definition core_rpc_server_commands_defs.h:78
#define CORE_RPC_STATUS_BUSY
Definition core_rpc_server_commands_defs.h:79
const char * res
Definition hmac_keccak.cpp:42