blocklogger

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 6, 2024 License: ISC Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlockLogger

type BlockLogger struct {
	// contains filtered or unexported fields
}

BlockLogger is a type tracking the amount of blocks/headers/transactions to log the time it took to receive them

func NewBlockLogger

func NewBlockLogger() *BlockLogger

NewBlockLogger creates a new instance with zeroed blocks/headers/transactions/time counters.

func (*BlockLogger) LogBlock

func (bl *BlockLogger) LogBlock(block *externalapi.DomainBlock)

LogBlock logs a new block blue score 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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL