Skip to content

Commit

Permalink
Stop slicing No off No Info for connection hash status (Chia-Netw…
Browse files Browse the repository at this point in the history
…ork#9803)

```
FULL_NODE 000.000.000.00                         50616/8444  a1b2c3d4... Jan 13 16:21:01      0.0|0.0    
                                                 -SB Height:        0    -Hash:  Info...
```

Should read `-Hash: No Info`
  • Loading branch information
altendky authored Jan 19, 2022
1 parent c116658 commit 69fe875
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion chia/cmds/show.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,10 @@ async def show_async(
connection_peak_hash = con["peak_hash"]
if connection_peak_hash is None:
connection_peak_hash = "No Info"
else:
if connection_peak_hash.startswith(("0x", "0X")):
connection_peak_hash = connection_peak_hash[2:]
connection_peak_hash = f"{connection_peak_hash[:8]}..."
if peak_height is None:
peak_height = 0
con_str = (
Expand All @@ -142,7 +146,7 @@ async def show_async(
f"{last_connect} "
f"{mb_up:7.1f}|{mb_down:<7.1f}"
f"\n "
f"-SB Height: {peak_height:8.0f} -Hash: {connection_peak_hash[2:10]}..."
f"-SB Height: {peak_height:8.0f} -Hash: {connection_peak_hash}"
)
else:
con_str = (
Expand Down

0 comments on commit 69fe875

Please sign in to comment.