aboutsummaryrefslogtreecommitdiff
path: root/src/rpc
diff options
context:
space:
mode:
authorluigi1111 <luigi1111w@gmail.com>2018-07-19 13:40:42 -0500
committerluigi1111 <luigi1111w@gmail.com>2018-07-19 13:40:42 -0500
commit3e026ff6edbdf9e6c300ac737c4cccfaeafb0516 (patch)
tree79ade90cb3910733680ed6375015d8d27dba96d0 /src/rpc
parentMerge pull request #3981 (diff)
parentrpc: add blockchain disk size to getinfo (diff)
downloadmonero-3e026ff6edbdf9e6c300ac737c4cccfaeafb0516.tar.xz
Merge pull request #4013
e5592c4 rpc: add blockchain disk size to getinfo (moneromooo-monero)
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 7db6b7f20..7119994f7 100644
--- a/src/rpc/core_rpc_server.cpp
+++ b/src/rpc/core_rpc_server.cpp
@@ -207,6 +207,7 @@ namespace cryptonote
boost::shared_lock<boost::shared_mutex> lock(m_bootstrap_daemon_mutex);
res.was_bootstrap_ever_used = m_was_bootstrap_ever_used;
}
+ res.database_size = m_core.get_blockchain_storage().get_db().get_database_size();
return true;
}
//------------------------------------------------------------------------------------------------------------------------------
@@ -1641,6 +1642,7 @@ namespace cryptonote
boost::shared_lock<boost::shared_mutex> lock(m_bootstrap_daemon_mutex);
res.was_bootstrap_ever_used = m_was_bootstrap_ever_used;
}
+ res.database_size = m_core.get_blockchain_storage().get_db().get_database_size();
return true;
}
//------------------------------------------------------------------------------------------------------------------------------
diff --git a/src/rpc/core_rpc_server_commands_defs.h b/src/rpc/core_rpc_server_commands_defs.h
index 6738171e2..de5be9fb8 100644
--- a/src/rpc/core_rpc_server_commands_defs.h
+++ b/src/rpc/core_rpc_server_commands_defs.h
@@ -967,6 +967,7 @@ namespace cryptonote
std::string bootstrap_daemon_address;
uint64_t height_without_bootstrap;
bool was_bootstrap_ever_used;
+ uint64_t database_size;
BEGIN_KV_SERIALIZE_MAP()
KV_SERIALIZE(status)
@@ -997,6 +998,7 @@ namespace cryptonote
KV_SERIALIZE(bootstrap_daemon_address)
KV_SERIALIZE(height_without_bootstrap)
KV_SERIALIZE(was_bootstrap_ever_used)
+ KV_SERIALIZE(database_size)
END_KV_SERIALIZE_MAP()
};
};