nervosnetwork / ckb

The Nervos CKB is a public permissionless blockchain, and the layer 1 of Nervos network.
https://www.nervos.org
MIT License
1.15k stars 228 forks source link

Backport #4439 Implement Logging of Estimated Duration for Syncing to Most Recent Header #4440

Closed eval-exec closed 4 months ago

eval-exec commented 4 months ago

Backport #4439

What problem does this PR solve?

What's Changed:

When CKB is in the Header Sync phase, display the estimated time required to synchronize to the latest header.

2024-04-28 11:05:23.194 +00:00 BlockDownload INFO ckb_sync::synchronizer  best known header 730000-Byte32(0xbc76d5fde38937fa55761d87518c465346bd6cd50d37d53592c639fd83cb2a2c), CKB is syncing to latest Header to find the assume valid target: Byte32(0xc394fa4c5e5032c49f3502d4fd8054ead76ff693a54ac90757e441b5119afcaf). Please wait. Need 28 minutes to sync to the latest Header.
2024-04-28 11:05:28.299 +00:00 BlockDownload INFO ckb_sync::synchronizer  best known header 740000-Byte32(0x56ea0217b500acc00864b5d72c2c745f5edeb56e5645f46f509bae9ece0824ea), CKB is syncing to latest Header to find the assume valid target: Byte32(0xc394fa4c5e5032c49f3502d4fd8054ead76ff693a54ac90757e441b5119afcaf). Please wait. Need 28 minutes to sync to the latest Header.

Related changes

Check List

Tests

Side effects

Release note

None: Exclude this PR from the release note.