From 9364b49ecbb3c906bbdf16de14d71ac493fbf1e6 Mon Sep 17 00:00:00 2001 From: Matt Smith Date: Tue, 22 Sep 2020 18:11:34 +0100 Subject: [PATCH] rpc: Add unlock height to getblocktemplate Signed-off-by: Matt Smith --- src/rpc/core_rpc_server.cpp | 1 + src/rpc/core_rpc_server_commands_defs.h | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/rpc/core_rpc_server.cpp b/src/rpc/core_rpc_server.cpp index d9e426364..c0c49f556 100644 --- a/src/rpc/core_rpc_server.cpp +++ b/src/rpc/core_rpc_server.cpp @@ -1773,6 +1773,7 @@ namespace cryptonote } res.reserved_offset = reserved_offset; + res.unlock_height = b.miner_tx.unlock_time; store_difficulty(wdiff, res.difficulty, res.wide_difficulty, res.difficulty_top64); blobdata block_blob = t_serializable_object_to_blob(b); blobdata hashing_blob = get_block_hashing_blob(b); diff --git a/src/rpc/core_rpc_server_commands_defs.h b/src/rpc/core_rpc_server_commands_defs.h index 8748b0540..8907a63c3 100644 --- a/src/rpc/core_rpc_server_commands_defs.h +++ b/src/rpc/core_rpc_server_commands_defs.h @@ -914,6 +914,7 @@ namespace cryptonote std::string next_seed_hash; blobdata blocktemplate_blob; blobdata blockhashing_blob; + uint64_t unlock_height; BEGIN_KV_SERIALIZE_MAP() KV_SERIALIZE_PARENT(rpc_response_base) @@ -929,6 +930,7 @@ namespace cryptonote KV_SERIALIZE(blockhashing_blob) KV_SERIALIZE(seed_hash) KV_SERIALIZE(next_seed_hash) + KV_SERIALIZE(unlock_height) END_KV_SERIALIZE_MAP() }; typedef epee::misc_utils::struct_init response;