Versions in this module Expand all Collapse all v1 v1.0.2 May 13, 2021 v1.0.0 Feb 1, 2021 Changes in this version + func GenKernelSource() string + func GetOpenCLGPUs() ([]*cl.Device, error) + type Backend struct + HashRateEstimate float64 + HashSincePrint uint64 + TotalHashes uint64 + type CpuMiner int64 + func NewCpuMiner(id int64) *CpuMiner + func (c *CpuMiner) CheckRange(hash *HashSettings, start uint64, n uint64) (string, uint64, error) + func (c *CpuMiner) Name() string + func (c *CpuMiner) StepSize() uint64 + type GpuMiner struct + func NewGpuMiner(device *cl.Device, config *config.GPUConfig, poolEnabled bool) (*GpuMiner, error) + func (g *GpuMiner) CheckRange(hash *HashSettings, start uint64, n uint64) (string, uint64, error) + func (g *GpuMiner) Name() string + func (g *GpuMiner) StepSize() uint64 + type HashSettings struct + func NewHashSettings(challenge *MiningChallenge, publicAddr string) *HashSettings + type Hasher interface + CheckRange func(hash *HashSettings, start uint64, n uint64) (string, uint64, error) + Name func() string + StepSize func() uint64 + type MiningChallenge struct + Challenge []byte + Difficulty *big.Int + RequestID *big.Int + RequestIDs [5]*big.Int + type MiningGroup struct + Backends []*Backend + LastPrinted time.Time + func NewMiningGroup(hashers []Hasher) *MiningGroup + func SetupMiningGroup(cfg *config.Config) (*MiningGroup, error) + func (g *MiningGroup) HashRateEstimate() float64 + func (g *MiningGroup) Mine(input chan *Work, output chan *Result) + func (g *MiningGroup) PreferredWorkMultiple() uint64 + func (g *MiningGroup) PrintHashRateSummary() + type MiningNotify struct + Challenge string + CleanJob bool + JobID string + LowDifficulty *big.Int + MedianDifficulty *big.Int + NetworkDifficulty *big.Int + PoolAddress string + func (n *MiningNotify) UnmarshalJSON(buf []byte) error + type MiningSetDifficulty struct + Difficulty *big.Int + func (n *MiningSetDifficulty) UnmarshalJSON(buf []byte) error + type MiningTasker struct + func CreateTasker(cfg *config.Config, proxy db.DataServerProxy) *MiningTasker + func (mt *MiningTasker) GetWork(input chan *Work) (*Work, bool) + type Result struct + Nonce string + Work *Work + type SolutionHandler struct + func CreateSolutionHandler(cfg *config.Config, submitter berryCommon.TransactionSubmitter, ...) *SolutionHandler + func (s *SolutionHandler) Submit(ctx context.Context, result *Result) bool + type StratumClient struct + func StratumConnect(host string, msgChan chan *StratumResponse) (*StratumClient, error) + func (c *StratumClient) Listen() + func (c *StratumClient) Request(method string, params ...string) *StratumResponse + func (c *StratumClient) Send(request *StratumRequest) *StratumResponse + func (c *StratumClient) SetTimeout(timeout int64) + type StratumPool struct + func CreatePool(cfg *config.Config, group *MiningGroup) *StratumPool + func (p *StratumPool) GetWork(input chan *Work) (*Work, bool) + func (p *StratumPool) Submit(ctx context.Context, result *Result) bool + type StratumRequest struct + ID uint64 + Method string + Params []string + type StratumResponse struct + Error error + ID uint64 + Method string + Params *json.RawMessage + Result *json.RawMessage + type Work struct + Challenge *MiningChallenge + N uint64 + PublicAddr string + Start uint64