diff --git a/src/page.h b/src/page.h index b46dfa3..b60efdc 100644 --- a/src/page.h +++ b/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 network_info_age = get_age(local_copy_server_timestamp, current_network_info.info_timestamp);