mirror of
https://github.com/Chia-Network/chia-blockchain.git
synced 2026-08-24 10:05:29 -05:00
Update CLI tools to use EiB when appropriate. (#3117)
This commit is contained in:
@@ -60,8 +60,13 @@ async def netstorge_async(rpc_port: int, delta_block_height: str, start: str) ->
|
||||
f"Header Hash: 0x{newer_block_header.header_hash}\n"
|
||||
)
|
||||
network_space_terabytes_estimate = network_space_bytes_estimate / 1024 ** 4
|
||||
if network_space_terabytes_estimate > 1024:
|
||||
print(f"The network has an estimated {network_space_terabytes_estimate / 1024:.3f} PiB")
|
||||
if network_space_terabytes_estimate >= 1024:
|
||||
network_space_terabytes_estimate = network_space_terabytes_estimate / 1024
|
||||
if network_space_terabytes_estimate >= 1024:
|
||||
network_space_terabytes_estimate = network_space_terabytes_estimate / 1024
|
||||
print(f"The network has an estimated {network_space_terabytes_estimate:.3f} EiB")
|
||||
else:
|
||||
print(f"The network has an estimated {network_space_terabytes_estimate:.3f} PiB")
|
||||
else:
|
||||
print(f"The network has an estimated {network_space_terabytes_estimate:.3f} TiB")
|
||||
|
||||
|
||||
+5
-1
@@ -88,7 +88,11 @@ async def show_async(
|
||||
network_space_human_readable = blockchain_state["space"] / 1024 ** 4
|
||||
if network_space_human_readable >= 1024:
|
||||
network_space_human_readable = network_space_human_readable / 1024
|
||||
print(f"{network_space_human_readable:.3f} PiB")
|
||||
if network_space_human_readable >= 1024:
|
||||
network_space_human_readable = network_space_human_readable / 1024
|
||||
print(f"{network_space_human_readable:.3f} EiB")
|
||||
else:
|
||||
print(f"{network_space_human_readable:.3f} PiB")
|
||||
else:
|
||||
print(f"{network_space_human_readable:.3f} TiB")
|
||||
print(f"Current difficulty: {difficulty}")
|
||||
|
||||
Reference in New Issue
Block a user