From 353e9c0c905b02918c346cf5edf43c994d2cc2b1 Mon Sep 17 00:00:00 2001 From: stoffu Date: Thu, 5 Apr 2018 23:15:15 +0900 Subject: Core RPC: optionally add POW hash to block_header_response --- src/daemon/rpc_command_executor.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/daemon/rpc_command_executor.cpp') diff --git a/src/daemon/rpc_command_executor.cpp b/src/daemon/rpc_command_executor.cpp index 73b8d1a18..b8ebf0fb9 100644 --- a/src/daemon/rpc_command_executor.cpp +++ b/src/daemon/rpc_command_executor.cpp @@ -74,6 +74,7 @@ namespace { << "depth: " << boost::lexical_cast(header.depth) << std::endl << "hash: " << header.hash << std::endl << "difficulty: " << boost::lexical_cast(header.difficulty) << std::endl + << "POW hash: " << header.pow_hash << std::endl << "reward: " << boost::lexical_cast(header.reward); } @@ -654,6 +655,7 @@ bool t_rpc_command_executor::print_block_by_hash(crypto::hash block_hash) { epee::json_rpc::error error_resp; req.hash = epee::string_tools::pod_to_hex(block_hash); + req.fill_pow_hash = true; std::string fail_message = "Unsuccessful"; @@ -685,6 +687,7 @@ bool t_rpc_command_executor::print_block_by_height(uint64_t height) { epee::json_rpc::error error_resp; req.height = height; + req.fill_pow_hash = true; std::string fail_message = "Unsuccessful"; -- cgit v1.2.3