aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2015-01-06 18:39:16 +0200
committerRiccardo Spagni <ric@spagni.net>2015-01-06 18:39:19 +0200
commit6600966e308528a412f85d5b55a380df05c1de8f (patch)
treea4fb9c4f6d8abb929625f92ef0c788d5a8cf453b /src
parentMerge pull request #208 (diff)
parentprevious hash added to GBT (diff)
downloadmonero-6600966e308528a412f85d5b55a380df05c1de8f.tar.xz
Merge pull request #211
7de1a2d previous hash added to GBT (Riccardo Spagni)
Diffstat (limited to 'src')
-rw-r--r--src/rpc/core_rpc_server.cpp1
-rw-r--r--src/rpc/core_rpc_server_commands_defs.h2
2 files changed, 3 insertions, 0 deletions
diff --git a/src/rpc/core_rpc_server.cpp b/src/rpc/core_rpc_server.cpp
index be45a5145..7a41e9b9f 100644
--- a/src/rpc/core_rpc_server.cpp
+++ b/src/rpc/core_rpc_server.cpp
@@ -475,6 +475,7 @@ namespace cryptonote
LOG_ERROR("Failed to calculate offset for ");
return false;
}
+ res.prev_hash = string_tools::pod_to_hex(b.prev_id);
res.blocktemplate_blob = string_tools::buff_to_hex_nodelimer(block_blob);
res.status = CORE_RPC_STATUS_OK;
return true;
diff --git a/src/rpc/core_rpc_server_commands_defs.h b/src/rpc/core_rpc_server_commands_defs.h
index 21dbb9f73..9fea933cb 100644
--- a/src/rpc/core_rpc_server_commands_defs.h
+++ b/src/rpc/core_rpc_server_commands_defs.h
@@ -383,6 +383,7 @@ namespace cryptonote
uint64_t difficulty;
uint64_t height;
uint64_t reserved_offset;
+ std::string prev_hash;
blobdata blocktemplate_blob;
std::string status;
@@ -390,6 +391,7 @@ namespace cryptonote
KV_SERIALIZE(difficulty)
KV_SERIALIZE(height)
KV_SERIALIZE(reserved_offset)
+ KV_SERIALIZE(prev_hash)
KV_SERIALIZE(blocktemplate_blob)
KV_SERIALIZE(status)
END_KV_SERIALIZE_MAP()