mirror of
https://codeberg.org/anoncontributorxmr/monero.git
synced 2024-11-26 17:32:33 +00:00
Merge pull request #6004
951ceab
daemon: print difficulty in decimal, as it used to be (moneromooo-monero)
This commit is contained in:
commit
2200767963
1 changed files with 8 additions and 8 deletions
|
@ -91,8 +91,8 @@ namespace {
|
||||||
<< "height: " << boost::lexical_cast<std::string>(header.height) << std::endl
|
<< "height: " << boost::lexical_cast<std::string>(header.height) << std::endl
|
||||||
<< "depth: " << boost::lexical_cast<std::string>(header.depth) << std::endl
|
<< "depth: " << boost::lexical_cast<std::string>(header.depth) << std::endl
|
||||||
<< "hash: " << header.hash << std::endl
|
<< "hash: " << header.hash << std::endl
|
||||||
<< "difficulty: " << header.wide_difficulty << std::endl
|
<< "difficulty: " << cryptonote::difficulty_type(header.wide_difficulty) << std::endl
|
||||||
<< "cumulative difficulty: " << header.wide_cumulative_difficulty << std::endl
|
<< "cumulative difficulty: " << cryptonote::difficulty_type(header.wide_cumulative_difficulty) << std::endl
|
||||||
<< "POW hash: " << header.pow_hash << std::endl
|
<< "POW hash: " << header.pow_hash << std::endl
|
||||||
<< "block size: " << header.block_size << std::endl
|
<< "block size: " << header.block_size << std::endl
|
||||||
<< "block weight: " << header.block_weight << std::endl
|
<< "block weight: " << header.block_weight << std::endl
|
||||||
|
@ -357,8 +357,8 @@ bool t_rpc_command_executor::show_difficulty() {
|
||||||
|
|
||||||
tools::success_msg_writer() << "BH: " << res.height
|
tools::success_msg_writer() << "BH: " << res.height
|
||||||
<< ", TH: " << res.top_block_hash
|
<< ", TH: " << res.top_block_hash
|
||||||
<< ", DIFF: " << res.wide_difficulty
|
<< ", DIFF: " << cryptonote::difficulty_type(res.wide_difficulty)
|
||||||
<< ", CUM_DIFF: " << res.wide_cumulative_difficulty
|
<< ", CUM_DIFF: " << cryptonote::difficulty_type(res.wide_cumulative_difficulty)
|
||||||
<< ", HR: " << cryptonote::difficulty_type(res.wide_difficulty) / res.target << " H/s";
|
<< ", HR: " << cryptonote::difficulty_type(res.wide_difficulty) / res.target << " H/s";
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -771,7 +771,7 @@ bool t_rpc_command_executor::print_blockchain_info(uint64_t start_block_index, u
|
||||||
<< ", size: " << header.block_size << ", weight: " << header.block_weight << " (long term " << header.long_term_weight << "), transactions: " << header.num_txes << std::endl
|
<< ", size: " << header.block_size << ", weight: " << header.block_weight << " (long term " << header.long_term_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
|
||||||
<< "difficulty: " << header.wide_difficulty << ", nonce " << header.nonce << ", reward " << cryptonote::print_money(header.reward) << std::endl;
|
<< "difficulty: " << cryptonote::difficulty_type(header.wide_difficulty) << ", nonce " << header.nonce << ", reward " << cryptonote::print_money(header.reward) << std::endl;
|
||||||
first = false;
|
first = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1904,7 +1904,7 @@ bool t_rpc_command_executor::alt_chain_info(const std::string &tip, size_t above
|
||||||
const auto &chain = chains[idx];
|
const auto &chain = chains[idx];
|
||||||
const uint64_t start_height = (chain.height - chain.length + 1);
|
const uint64_t start_height = (chain.height - chain.length + 1);
|
||||||
tools::msg_writer() << chain.length << " blocks long, from height " << start_height << " (" << (ires.height - start_height - 1)
|
tools::msg_writer() << chain.length << " blocks long, from height " << start_height << " (" << (ires.height - start_height - 1)
|
||||||
<< " deep), diff " << chain.wide_difficulty << ": " << chain.block_hash;
|
<< " deep), diff " << cryptonote::difficulty_type(chain.wide_difficulty) << ": " << chain.block_hash;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -1917,7 +1917,7 @@ bool t_rpc_command_executor::alt_chain_info(const std::string &tip, size_t above
|
||||||
tools::success_msg_writer() << "Found alternate chain with tip " << tip;
|
tools::success_msg_writer() << "Found alternate chain with tip " << tip;
|
||||||
uint64_t start_height = (chain.height - chain.length + 1);
|
uint64_t start_height = (chain.height - chain.length + 1);
|
||||||
tools::msg_writer() << chain.length << " blocks long, from height " << start_height << " (" << (ires.height - start_height - 1)
|
tools::msg_writer() << chain.length << " blocks long, from height " << start_height << " (" << (ires.height - start_height - 1)
|
||||||
<< " deep), diff " << chain.wide_difficulty << ":";
|
<< " deep), diff " << cryptonote::difficulty_type(chain.wide_difficulty) << ":";
|
||||||
for (const std::string &block_id: chain.block_hashes)
|
for (const std::string &block_id: chain.block_hashes)
|
||||||
tools::msg_writer() << " " << block_id;
|
tools::msg_writer() << " " << block_id;
|
||||||
tools::msg_writer() << "Chain parent on main chain: " << chain.main_chain_parent_block;
|
tools::msg_writer() << "Chain parent on main chain: " << chain.main_chain_parent_block;
|
||||||
|
@ -2021,7 +2021,7 @@ bool t_rpc_command_executor::print_blockchain_dynamic_stats(uint64_t nblocks)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
tools::msg_writer() << "Height: " << ires.height << ", diff " << ires.wide_difficulty << ", cum. diff " << ires.wide_cumulative_difficulty
|
tools::msg_writer() << "Height: " << ires.height << ", diff " << cryptonote::difficulty_type(ires.wide_difficulty) << ", cum. diff " << cryptonote::difficulty_type(ires.wide_cumulative_difficulty)
|
||||||
<< ", target " << ires.target << " sec" << ", dyn fee " << cryptonote::print_money(feres.fee) << "/" << (hfres.enabled ? "byte" : "kB");
|
<< ", target " << ires.target << " sec" << ", dyn fee " << cryptonote::print_money(feres.fee) << "/" << (hfres.enabled ? "byte" : "kB");
|
||||||
|
|
||||||
if (nblocks > 0)
|
if (nblocks > 0)
|
||||||
|
|
Loading…
Reference in a new issue