stats

package
v0.0.0-...-031fc53 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2020 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlockConfirmationManager

type BlockConfirmationManager struct {
	Database          *db.Database
	Node              *nodeapi.Node
	Context           context.Context
	ContextCancelFunc context.CancelFunc
	// contains filtered or unexported fields
}

BlockConfirmationManager is a daemon that confirms blocks by verifying its type (block/uncle/orphan)

func NewBlockConfirmationManager

func NewBlockConfirmationManager(database *db.Database, engineWaitGroup *sync.WaitGroup, node *nodeapi.Node, confirmationsRequired uint64) *BlockConfirmationManager

NewBlockConfirmationManager creates a new BlockConfirmationManager instance

func (*BlockConfirmationManager) Run

func (b *BlockConfirmationManager) Run()

Run function runs the BlockConfirmationManager

func (*BlockConfirmationManager) Stop

func (b *BlockConfirmationManager) Stop()

Stop function stops the BlockConfirmationManager

type Collector

type Collector struct {
	// map[<worker-name>]PendingStat
	PendingStats map[string]PendingStat

	ShareDifficulty   uint64
	Database          *db.Database
	Context           context.Context
	ContextCancelFunc context.CancelFunc
	Mux               sync.Mutex
	// contains filtered or unexported fields
}

Collector is a stat collection daemon struct

func NewCollector

func NewCollector(database *db.Database, engineWaitGroup *sync.WaitGroup, shareDifficulty uint64) *Collector

NewCollector creates a new Stats Collector

func (*Collector) Clear

func (c *Collector) Clear()

Clear deletes all keys (and values) from the c.PendingStats

func (*Collector) Init

func (c *Collector) Init()

Init initializes the Collector

func (*Collector) Run

func (c *Collector) Run()

Run runs the StatsCollector

func (*Collector) Stop

func (c *Collector) Stop()

Stop function stops stats collector

type PendingStat

type PendingStat struct {
	ValidShares      uint64
	StaleShares      uint64
	InvalidShares    uint64
	ReportedHashrate float64
	IPAddress        string
}

PendingStat is a pending Stat struct

Jump to

Keyboard shortcuts

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