Skip to content

Commit a11649f

Browse files
committed
display head with humanize_hash in chain sync logs
1 parent 30d13d1 commit a11649f

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

trinity/sync/full/chain.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
TaskQueue,
6666
)
6767
from trinity.utils.ema import EMA
68-
from trinity.utils.humanize import humanize_elapsed
68+
from trinity.utils.humanize import humanize_elapsed, humanize_hash
6969
from trinity.utils.timer import Timer
7070

7171
# (ReceiptBundle, (Receipt, (root_hash, receipt_trie_data))
@@ -537,7 +537,7 @@ async def _display_stats(self) -> None:
537537
"bps=%-3d "
538538
"tps=%-4d "
539539
"elapsed=%0.1f "
540-
"head=#%d (%s...%s) "
540+
"head=#%d %s "
541541
"age=%s"
542542
),
543543
stats.num_blocks,
@@ -546,8 +546,7 @@ async def _display_stats(self) -> None:
546546
stats.transactions_per_second,
547547
stats.elapsed,
548548
stats.latest_head.block_number,
549-
stats.latest_head.hex_hash[2:6],
550-
stats.latest_head.hex_hash[-4:],
549+
humanize_hash(stats.latest_head.hash),
551550
humanize_elapsed(head_age),
552551
)
553552

0 commit comments

Comments
 (0)