diff --git a/src/rpc/core_rpc_server.cpp b/src/rpc/core_rpc_server.cpp index 01c07dac..77429e54 100644 --- a/src/rpc/core_rpc_server.cpp +++ b/src/rpc/core_rpc_server.cpp @@ -156,6 +156,8 @@ namespace currency m_core.get_blockchain_storage().get_top_block(b); res.last_block_total_reward = currency::get_reward_from_miner_tx(b.miner_tx); res.pos_diff_total_coins_rate = (pos_diff / (res.total_coins - PREMINE_AMOUNT + 1)).convert_to(); + res.last_block_timestamp = b.timestamp; + res.last_block_hash = string_tools::pod_to_hex(get_block_hash(b)); } if (req.flags&COMMAND_RPC_GET_INFO_FLAG_POS_BLOCK_TS_SHIFT_VS_ACTUAL) { diff --git a/src/rpc/core_rpc_server_commands_defs.h b/src/rpc/core_rpc_server_commands_defs.h index 7b6e78e1..3ceb9dbc 100644 --- a/src/rpc/core_rpc_server_commands_defs.h +++ b/src/rpc/core_rpc_server_commands_defs.h @@ -660,6 +660,8 @@ namespace currency uint64_t tx_count_in_last_block; uint64_t default_fee; uint64_t minimum_fee; + uint64_t last_block_timestamp; + std::string last_block_hash; //market uint64_t offers_count; @@ -708,6 +710,8 @@ namespace currency KV_SERIALIZE(tx_count_in_last_block) KV_SERIALIZE(default_fee) KV_SERIALIZE(minimum_fee) + KV_SERIALIZE(last_block_timestamp) + KV_SERIALIZE(last_block_hash) KV_SERIALIZE(offers_count) END_KV_SERIALIZE_MAP() };