mirror of
https://git.wownero.com/wownero/onion-wownero-blockchain-explorer.git
synced 2024-08-15 00:33:12 +00:00
improve formating of hash rate
This commit is contained in:
parent
cfcef1d749
commit
7bb80afea8
1 changed files with 5 additions and 7 deletions
12
src/page.h
12
src/page.h
|
@ -881,14 +881,12 @@ public:
|
|||
// perapre network info mstch::map for the front page
|
||||
string hash_rate;
|
||||
|
||||
if (testnet || stagenet)
|
||||
{
|
||||
hash_rate = std::to_string(current_network_info.hash_rate) + " H/s";
|
||||
}
|
||||
else
|
||||
{
|
||||
if (current_network_info.hash_rate > 1e6)
|
||||
hash_rate = fmt::format("{:0.3f} MH/s", current_network_info.hash_rate/1.0e6);
|
||||
}
|
||||
else if (current_network_info.hash_rate > 1e3)
|
||||
hash_rate = fmt::format("{:0.3f} kH/s", current_network_info.hash_rate/1.0e3);
|
||||
else
|
||||
hash_rate = fmt::format("{:0.3f} H/s", current_network_info.hash_rate);
|
||||
|
||||
pair<string, string> network_info_age = get_age(local_copy_server_timestamp,
|
||||
current_network_info.info_timestamp);
|
||||
|
|
Loading…
Reference in a new issue