mirror of
https://codeberg.org/anoncontributorxmr/monero.git
synced 2024-11-23 19:33:28 +01:00
daemon: print human friendly timestamp too
This commit is contained in:
parent
6bc0c7e685
commit
d24c325c7d
@ -66,7 +66,7 @@ namespace {
|
|||||||
void print_block_header(cryptonote::block_header_response const & header)
|
void print_block_header(cryptonote::block_header_response const & header)
|
||||||
{
|
{
|
||||||
tools::success_msg_writer()
|
tools::success_msg_writer()
|
||||||
<< "timestamp: " << boost::lexical_cast<std::string>(header.timestamp) << std::endl
|
<< "timestamp: " << boost::lexical_cast<std::string>(header.timestamp) << " (" << tools::get_human_readable_timestamp(header.timestamp) << ")" << std::endl
|
||||||
<< "previous hash: " << header.prev_hash << std::endl
|
<< "previous hash: " << header.prev_hash << std::endl
|
||||||
<< "nonce: " << boost::lexical_cast<std::string>(header.nonce) << std::endl
|
<< "nonce: " << boost::lexical_cast<std::string>(header.nonce) << std::endl
|
||||||
<< "is orphan: " << header.orphan_status << std::endl
|
<< "is orphan: " << header.orphan_status << std::endl
|
||||||
@ -569,7 +569,7 @@ bool t_rpc_command_executor::print_blockchain_info(uint64_t start_block_index, u
|
|||||||
if (!first)
|
if (!first)
|
||||||
tools::msg_writer() << "" << std::endl;
|
tools::msg_writer() << "" << std::endl;
|
||||||
tools::msg_writer()
|
tools::msg_writer()
|
||||||
<< "height: " << header.height << ", timestamp: " << header.timestamp
|
<< "height: " << header.height << ", timestamp: " << header.timestamp << " (" << tools::get_human_readable_timestamp(header.timestamp) << ")"
|
||||||
<< ", size: " << header.block_size << ", weight: " << header.block_weight << ", transactions: " << header.num_txes << std::endl
|
<< ", size: " << header.block_size << ", weight: " << header.block_weight << ", transactions: " << header.num_txes << std::endl
|
||||||
<< "major version: " << (unsigned)header.major_version << ", minor version: " << (unsigned)header.minor_version << std::endl
|
<< "major version: " << (unsigned)header.major_version << ", minor version: " << (unsigned)header.minor_version << std::endl
|
||||||
<< "block id: " << header.hash << ", previous block id: " << header.prev_hash << std::endl
|
<< "block id: " << header.hash << ", previous block id: " << header.prev_hash << std::endl
|
||||||
|
Loading…
Reference in New Issue
Block a user