Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BlockProgressLogger ¶
BlockProgressLogger provides periodic logging for other services in order to show users progress of certain "actions" involving some or all current blocks. Ex: syncing to best chain, indexing all blocks, etc.
func NewBlockProgressLogger ¶
func NewBlockProgressLogger(progressMessage string, logger btclog.Logger) *BlockProgressLogger
NewBlockProgressLogger returns a new block progress logger. The progress message is templated as follows:
{progressAction} {numProcessed} {blocks|block} in the last {timePeriod} ({numTxs}, height {lastBlockHeight}, {lastBlockTimeStamp})
func (*BlockProgressLogger) LogBlockHeight ¶
func (b *BlockProgressLogger) LogBlockHeight(block, parent *dcrutil.Block)
LogBlockHeight logs a new block height as an information message to show progress to the user. In order to prevent spam, it limits logging to one message every 10 seconds with duration and totals included.
Click to show internal directories.
Click to hide internal directories.