mirror of
https://github.com/monero-project/monero.git
synced 2024-11-17 08:17:37 +00:00
rpc: fail update RPC when running offline
This commit is contained in:
parent
c0bc6d96cd
commit
1e8f3f66bf
1 changed files with 7 additions and 0 deletions
|
@ -2107,6 +2107,13 @@ namespace cryptonote
|
|||
bool core_rpc_server::on_update(const COMMAND_RPC_UPDATE::request& req, COMMAND_RPC_UPDATE::response& res, const connection_context *ctx)
|
||||
{
|
||||
PERF_TIMER(on_update);
|
||||
|
||||
if (m_core.offline())
|
||||
{
|
||||
res.status = "Daemon is running offline";
|
||||
return true;
|
||||
}
|
||||
|
||||
static const char software[] = "monero";
|
||||
#ifdef BUILD_TAG
|
||||
static const char buildtag[] = BOOST_PP_STRINGIZE(BUILD_TAG);
|
||||
|
|
Loading…
Reference in a new issue