mirror of
https://github.com/Chia-Network/chia-blockchain.git
synced 2024-09-11 18:58:59 +03:00
Merge pull request #6822 from willi123yao/cli-show-syncing
Make syncing message in CLI more intuitive like the GUI
This commit is contained in:
commit
4b002a4a74
@ -50,18 +50,14 @@ async def show_async(
|
||||
total_iters = peak.total_iters if peak is not None else 0
|
||||
num_blocks: int = 10
|
||||
|
||||
if sync_mode:
|
||||
sync_max_block = blockchain_state["sync"]["sync_tip_height"]
|
||||
sync_current_block = blockchain_state["sync"]["sync_progress_height"]
|
||||
print(
|
||||
"Current Blockchain Status: Full Node syncing to block",
|
||||
sync_max_block,
|
||||
"\nCurrently synced to block:",
|
||||
sync_current_block,
|
||||
)
|
||||
if synced:
|
||||
print("Current Blockchain Status: Full Node Synced")
|
||||
print("\nPeak: Hash:", peak.header_hash if peak is not None else "")
|
||||
elif peak is not None and sync_mode:
|
||||
sync_max_block = blockchain_state["sync"]["sync_tip_height"]
|
||||
sync_current_block = blockchain_state["sync"]["sync_progress_height"]
|
||||
print(f"Current Blockchain Status: Syncing {sync_current_block}/{sync_max_block}.")
|
||||
print("Peak: Hash:", peak.header_hash if peak is not None else "")
|
||||
elif peak is not None:
|
||||
print(f"Current Blockchain Status: Not Synced. Peak height: {peak.height}")
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user