aboutsummaryrefslogtreecommitdiff
path: root/src/rpc
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2017-01-13 14:35:21 -0500
committerRiccardo Spagni <ric@spagni.net>2017-01-13 14:35:21 -0500
commit0b6031adbfdfe570a1985ae0eabbc056a5545a84 (patch)
tree78776d0da0587f2127e5e52f2214c1c57b6628d5 /src/rpc
parentMerge pull request #1541 (diff)
parentAdd start_time to get_info methods and show uptime (diff)
downloadmonero-0b6031adbfdfe570a1985ae0eabbc056a5545a84.tar.xz
Merge pull request #1543
19be7225 Add start_time to get_info methods and show uptime (Miguel Herranz)
Diffstat (limited to 'src/rpc')
-rw-r--r--src/rpc/core_rpc_server.cpp2
-rw-r--r--src/rpc/core_rpc_server_commands_defs.h2
2 files changed, 4 insertions, 0 deletions
diff --git a/src/rpc/core_rpc_server.cpp b/src/rpc/core_rpc_server.cpp
index 558031f52..ddf892cae 100644
--- a/src/rpc/core_rpc_server.cpp
+++ b/src/rpc/core_rpc_server.cpp
@@ -145,6 +145,7 @@ namespace cryptonote
res.cumulative_difficulty = m_core.get_blockchain_storage().get_db().get_block_cumulative_difficulty(res.height - 1);
res.block_size_limit = m_core.get_blockchain_storage().get_current_cumulative_blocksize_limit();
res.status = CORE_RPC_STATUS_OK;
+ res.start_time = (uint64_t)m_core.get_start_time();
return true;
}
//------------------------------------------------------------------------------------------------------------------------------
@@ -1167,6 +1168,7 @@ namespace cryptonote
res.cumulative_difficulty = m_core.get_blockchain_storage().get_db().get_block_cumulative_difficulty(res.height - 1);
res.block_size_limit = m_core.get_blockchain_storage().get_current_cumulative_blocksize_limit();
res.status = CORE_RPC_STATUS_OK;
+ res.start_time = (uint64_t)m_core.get_start_time();
return true;
}
//------------------------------------------------------------------------------------------------------------------------------
diff --git a/src/rpc/core_rpc_server_commands_defs.h b/src/rpc/core_rpc_server_commands_defs.h
index a4edc7538..fa86c08e4 100644
--- a/src/rpc/core_rpc_server_commands_defs.h
+++ b/src/rpc/core_rpc_server_commands_defs.h
@@ -521,6 +521,7 @@ namespace cryptonote
std::string top_block_hash;
uint64_t cumulative_difficulty;
uint64_t block_size_limit;
+ uint64_t start_time;
BEGIN_KV_SERIALIZE_MAP()
KV_SERIALIZE(status)
@@ -539,6 +540,7 @@ namespace cryptonote
KV_SERIALIZE(top_block_hash)
KV_SERIALIZE(cumulative_difficulty)
KV_SERIALIZE(block_size_limit)
+ KV_SERIALIZE(start_time)
END_KV_SERIALIZE_MAP()
};
};