dcrd/internal/progresslog
Dave Collins ae4281bcfc
multi: Add chain verify progress percentage.
This modifies blockchain, progresslog, and netsync to provide a progress
percentage when logging the main chain verification process.

A new method is added to blockchain that determines the verification
progress of the current best chain based on how far along it towards the
best known header and blockchain is also modified to log the
verification progress in the initial chain state message when the
blockchain is first loaded.

In addition, the progess logger is modified to log the verification
progress instead of the timestamp of the last block and the netsync code
is updated to make use of the new verification progress func per above.

Finally, the netsync code now determines when the chain is considered
current and logs new blocks as they are connected along with their hash
and additional details.  This provides a cleaner distinction between the
initial verification and catchup phase and steady state operation.
2021-01-21 23:30:35 -06:00
..
doc.go progresslog: Make logger more generic. 2021-01-21 23:20:13 -06:00
logger_test.go multi: Add chain verify progress percentage. 2021-01-21 23:30:35 -06:00
logger.go multi: Add chain verify progress percentage. 2021-01-21 23:30:35 -06:00
README.md progresslog: Add package documentation. 2020-12-14 19:20:07 -06:00

progresslog

Build Status ISC License Doc

Package progresslog provides periodic logging for block processing.

Tests are included to ensure proper functionality.

Feature Overview

  • Maintains cumulative totals about blocks between each logging interval
    • Total number of blocks
    • Total number of transactions
    • Total number of votes
    • Total number of tickets
    • Total number of revocations
  • Logs all cumulative data every 10 seconds
  • Immediately logs any outstanding data when the provided sync height is reached

License

Package progresslog is licensed under the copyfree ISC License.