aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2019-04-16 22:48:50 +0200
committerRiccardo Spagni <ric@spagni.net>2019-04-16 22:48:50 +0200
commit1b092f3a4485285ee10b964b13bb329de51f85c6 (patch)
treecd99954a3681c47ca1f7f34a263308c7cb031e13
parentMerge pull request #5450 (diff)
parentrpc: add a pruned bool to the prune_blockchain call (diff)
downloadmonero-1b092f3a4485285ee10b964b13bb329de51f85c6.tar.xz
Merge pull request #5452
c30d93fc rpc: add a pruned bool to the prune_blockchain call (moneromooo-monero)
-rw-r--r--src/rpc/core_rpc_server.cpp1
-rw-r--r--src/rpc/core_rpc_server_commands_defs.h4
2 files changed, 4 insertions, 1 deletions
diff --git a/src/rpc/core_rpc_server.cpp b/src/rpc/core_rpc_server.cpp
index ec3833a1c..c41fb37d8 100644
--- a/src/rpc/core_rpc_server.cpp
+++ b/src/rpc/core_rpc_server.cpp
@@ -2382,6 +2382,7 @@ namespace cryptonote
return false;
}
res.pruning_seed = m_core.get_blockchain_pruning_seed();
+ res.pruned = res.pruning_seed != 0;
}
catch (const std::exception &e)
{
diff --git a/src/rpc/core_rpc_server_commands_defs.h b/src/rpc/core_rpc_server_commands_defs.h
index 8342e88b1..cfe4bbf23 100644
--- a/src/rpc/core_rpc_server_commands_defs.h
+++ b/src/rpc/core_rpc_server_commands_defs.h
@@ -84,7 +84,7 @@ namespace cryptonote
// advance which version they will stop working with
// Don't go over 32767 for any of these
#define CORE_RPC_VERSION_MAJOR 2
-#define CORE_RPC_VERSION_MINOR 5
+#define CORE_RPC_VERSION_MINOR 6
#define MAKE_CORE_RPC_VERSION(major,minor) (((major)<<16)|(minor))
#define CORE_RPC_VERSION MAKE_CORE_RPC_VERSION(CORE_RPC_VERSION_MAJOR, CORE_RPC_VERSION_MINOR)
@@ -2320,11 +2320,13 @@ namespace cryptonote
struct response_t
{
+ bool pruned;
uint32_t pruning_seed;
std::string status;
BEGIN_KV_SERIALIZE_MAP()
KV_SERIALIZE(status)
+ KV_SERIALIZE(pruned)
KV_SERIALIZE(pruning_seed)
END_KV_SERIALIZE_MAP()
};