mirror of
https://github.com/monero-project/monero.git
synced 2026-01-04 16:57:44 -08:00
Merge pull request #6035
b90c4bc3rpc: error out from get_info if the proxied call errors out (moneromooo-monero)fa16df99make_test_signature: exit nicely on top level exception (moneromooo-monero)054b2621node_rpc_proxy: init some new rpc payment fields in invalidate (moneromooo-monero)d0faae2arpc: init a few missing client_info members (moneromooo-monero)d56a483arpc: do not propagate exceptions out of a dtor (moneromooo-monero)3c849188rpc: always set the update field in update on sucess (moneromooo-monero)
This commit is contained in:
@@ -87,10 +87,14 @@ namespace
|
||||
RPCTracker(const char *rpc, tools::LoggingPerformanceTimer &timer): rpc(rpc), timer(timer) {
|
||||
}
|
||||
~RPCTracker() {
|
||||
boost::unique_lock<boost::mutex> lock(mutex);
|
||||
auto &e = tracker[rpc];
|
||||
++e.count;
|
||||
e.time += timer.value();
|
||||
try
|
||||
{
|
||||
boost::unique_lock<boost::mutex> lock(mutex);
|
||||
auto &e = tracker[rpc];
|
||||
++e.count;
|
||||
e.time += timer.value();
|
||||
}
|
||||
catch (...) { /* ignore */ }
|
||||
}
|
||||
void pay(uint64_t amount) {
|
||||
boost::unique_lock<boost::mutex> lock(mutex);
|
||||
@@ -2229,8 +2233,7 @@ namespace cryptonote
|
||||
//------------------------------------------------------------------------------------------------------------------------------
|
||||
bool core_rpc_server::on_get_info_json(const COMMAND_RPC_GET_INFO::request& req, COMMAND_RPC_GET_INFO::response& res, epee::json_rpc::error& error_resp, const connection_context *ctx)
|
||||
{
|
||||
on_get_info(req, res, ctx);
|
||||
if (res.status != CORE_RPC_STATUS_OK)
|
||||
if (!on_get_info(req, res, ctx) || res.status != CORE_RPC_STATUS_OK)
|
||||
{
|
||||
error_resp.code = CORE_RPC_ERROR_CODE_INTERNAL_ERROR;
|
||||
error_resp.message = res.status;
|
||||
@@ -2624,6 +2627,7 @@ namespace cryptonote
|
||||
{
|
||||
RPC_TRACKER(update);
|
||||
|
||||
res.update = false;
|
||||
if (m_core.offline())
|
||||
{
|
||||
res.status = "Daemon is running offline";
|
||||
|
||||
Reference in New Issue
Block a user