Skip to content

Commit

Permalink
cleanup import logging output
Browse files Browse the repository at this point in the history
  • Loading branch information
pipermerriam committed May 29, 2018
1 parent 86e608c commit 54fb40f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions p2p/chain.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,10 +272,11 @@ async def _process_headers(self, peer: ETHPeer, headers: List[BlockHeader]) -> i

head = await self.chaindb.coro_get_canonical_head()
self.logger.info(
"Imported chain segment in %d seconds, new head: #%d (%s)",
"Imported %d headers in %0.2f seconds, new head: #%d (%s)",
len(headers),
time.time() - start,
head.block_number,
encode_hex(head.hash)[2:6],
encode_hex(head.hash)[2:8],
)
# Quite often the header batch we receive here includes headers past the peer's reported
# head (via the NewBlock msg), so we can't compare our head's hash to the peer's in
Expand Down

0 comments on commit 54fb40f

Please sign in to comment.