src

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var HashRateLimit ratelimit.Limiter

Functions

func DifficultyAtFromList

func DifficultyAtFromList(spot int, list []*opr.UniqueOPRData) (index int, diff uint64)

DifficultyAt will return the difficulty at the spot or the closest spot to it if we don't have enough. So if you target 50, and we only have 4, it will return the 4th.

func Execute

func Execute()

func RandomDifficulty

func RandomDifficulty() uint64

func UpdateHashRate

func UpdateHashRate(cmd *cobra.Command, args []string)

Types

type PerBlock

type PerBlock struct {
	Height          int
	Duration        time.Duration
	TotalHashes     uint64
	NonceAggregator *opr.NonceRanking
}

func (*PerBlock) CsvHeader

func (b *PerBlock) CsvHeader() []string

func (*PerBlock) DifficultyAt

func (b *PerBlock) DifficultyAt(spot int) (index int, diff uint64)

DifficultyAt will return the difficulty at the spot or the closest spot to it if we don't have enough. So if you target 50, and we only have 4, it will return the 4th.

func (*PerBlock) Records

func (b *PerBlock) Records(target int, minDiff uint64) []string

func (*PerBlock) String

func (b *PerBlock) String() string

Jump to

Keyboard shortcuts

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