Merge pull request #3561

353e9c0 Core RPC: optionally add POW hash to block_header_response (stoffu)
This commit is contained in:
luigi1111 2018-05-31 14:38:01 -05:00
commit 737712c0c6
No known key found for this signature in database
GPG key ID: F4ACA0183641E010
4 changed files with 25 additions and 8 deletions

View file

@ -74,6 +74,7 @@ namespace {
<< "depth: " << boost::lexical_cast<std::string>(header.depth) << std::endl
<< "hash: " << header.hash << std::endl
<< "difficulty: " << boost::lexical_cast<std::string>(header.difficulty) << std::endl
<< "POW hash: " << header.pow_hash << std::endl
<< "reward: " << boost::lexical_cast<std::string>(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";