pool

package
v0.0.0-...-ec79626 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const DesiredSubmissionIntSec = 10
View Source
const DifficultyAdjustIntSec = 30
View Source
const InitiallyAssumedHashRate = 1e6

TODO should be per-algo TODO support initial difficulty selection (login benchmark info)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	R        *bufio.Reader
	W        io.Writer
	Id       string
	JobIdInt int
	Work
	Job           stratum.StratumJobParams
	ValidShares   int
	InvalidShares int
	EstHashes     float64
	Difficulty    float64
	LastSub       *time.Time
	Start         *time.Time
	Shares        []string

	Log *log.Logger
}

func (Client) Blob

func (c Client) Blob() string

func (*Client) Control

func (c *Client) Control(works chan Work, solutions chan string)

func (Client) DifficultyTarget

func (c Client) DifficultyTarget() (float64, string)

func (Client) DifficultyTargetForHashRate

func (c Client) DifficultyTargetForHashRate(hr float64) (float64, string)

XXX we should make our target more flexible, maybe into bits

func (Client) HashRate

func (c Client) HashRate() float64

func (*Client) ResetAlgo

func (c *Client) ResetAlgo()

func (*Client) ValidateSubmission

type Work

type Work struct {
	Hash string
	Algo string
}

Jump to

Keyboard shortcuts

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