minerworkerwrap

package
v0.0.0-...-9b1746c Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type WorkerWrap

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

func NewWorkerWrap

func NewWorkerWrap(config *WorkerWrapConfig) *WorkerWrap

func (*WorkerWrap) CloseUploadHashrate

func (g *WorkerWrap) CloseUploadHashrate()

关闭算力统计

func (*WorkerWrap) DoNextMining

func (g *WorkerWrap) DoNextMining(pendingHeight uint64)

to do next

func (*WorkerWrap) Excavate

func (g *WorkerWrap) Excavate(miningStuffCh chan interfaces.PowWorkerMiningStuffItem, resultCh chan interfaces.PowWorkerMiningStuffItem)

do mining

func (*WorkerWrap) InitStart

func (g *WorkerWrap) InitStart() error

初始化

func (*WorkerWrap) SetPowDevice

func (g *WorkerWrap) SetPowDevice(device interfaces.PowDevice)

设置挖矿设备端

func (*WorkerWrap) StopAllMining

func (g *WorkerWrap) StopAllMining()

stop mining

type WorkerWrapConfig

type WorkerWrapConfig struct {
	IsReportHashrate bool // 是否上报算力
	// CPU 配置
	Supervene uint32 // CPU 并发挖矿
	// GPU 配置
	GPU_Enable             bool
	GPU_OpenclPath         string
	GPU_PlatformNameMatch  string
	GPU_GroupSize          int
	GPU_GroupConcurrentNum int
	GPU_ItemLoopNum        int
	GPU_UseOneDeviceBuild  bool // 使用单个设备编译
	GPU_ForceRebuild       bool // 强制重新编译
	GPU_EmptyFuncTest      bool // 空函数编译测试
}

func NewEmptyWorkerWrapConfig

func NewEmptyWorkerWrapConfig() *WorkerWrapConfig

func NewWorkerWrapConfig

func NewWorkerWrapConfig(cnffile *sys.Inicnf) *WorkerWrapConfig

Jump to

Keyboard shortcuts

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