aboutsummaryrefslogtreecommitdiff
path: root/src/rpc/core_rpc_server.cpp
diff options
context:
space:
mode:
authorNeozaru <neozaru@mailoo.org>2014-05-16 00:21:43 +0200
committerNeozaru <neozaru@mailoo.org>2014-05-16 00:21:43 +0200
commit46906700318c5361f0e04a7639bfe2ba01b7564c (patch)
tree30d1f1908bbd41f6e8afb05116c180dcc93a7a6a /src/rpc/core_rpc_server.cpp
parentMerge pull request #10 from NoodleDoodleNoodleDoodleNoodleDoodleNoo/patch-8 (diff)
downloadmonero-46906700318c5361f0e04a7639bfe2ba01b7564c.tar.xz
Added 'save_bc' command in daemon for saving blockchain remotely
Diffstat (limited to 'src/rpc/core_rpc_server.cpp')
-rw-r--r--src/rpc/core_rpc_server.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/rpc/core_rpc_server.cpp b/src/rpc/core_rpc_server.cpp
index 631fb5cf8..d2c94fe39 100644
--- a/src/rpc/core_rpc_server.cpp
+++ b/src/rpc/core_rpc_server.cpp
@@ -275,6 +275,20 @@ namespace cryptonote
return true;
}
//------------------------------------------------------------------------------------------------------------------------------
+ bool core_rpc_server::on_save_bc(const COMMAND_RPC_SAVE_BC::request& req, COMMAND_RPC_SAVE_BC::response& res, connection_context& cntx)
+ {
+ CHECK_CORE_READY();
+ if( !m_core.get_blockchain_storage().store_blockchain() )
+ {
+ // TODO
+ res.status = "Error while storing blockhain";
+
+ return true;
+ }
+ res.status = CORE_RPC_STATUS_OK;
+ return true;
+ }
+ //------------------------------------------------------------------------------------------------------------------------------
bool core_rpc_server::on_getblockcount(const COMMAND_RPC_GETBLOCKCOUNT::request& req, COMMAND_RPC_GETBLOCKCOUNT::response& res, connection_context& cntx)
{
CHECK_CORE_READY();