miner

package
v0.8.6-0...-97c3735 Latest Latest
Warning

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

Go to latest
Published: May 6, 2015 License: LGPL-2.1-or-later Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Agent

type Agent interface {
	Work() chan<- *types.Block
	SetReturnCh(chan<- *types.Block)
	Stop()
	Start()
	GetHashRate() int64
}

type CpuMiner

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

func NewCpuMiner

func NewCpuMiner(index int, pow pow.PoW) *CpuMiner

func (*CpuMiner) GetHashRate

func (self *CpuMiner) GetHashRate() int64

func (*CpuMiner) Pow

func (self *CpuMiner) Pow() pow.PoW

func (*CpuMiner) SetReturnCh

func (self *CpuMiner) SetReturnCh(ch chan<- *types.Block)

func (*CpuMiner) Start

func (self *CpuMiner) Start()

func (*CpuMiner) Stop

func (self *CpuMiner) Stop()

func (*CpuMiner) Work

func (self *CpuMiner) Work() chan<- *types.Block

type Miner

type Miner struct {
	MinAcceptedGasPrice *big.Int
	// contains filtered or unexported fields
}

func New

func New(eth core.Backend, pow pow.PoW, minerThreads int) *Miner

func (*Miner) HashRate

func (self *Miner) HashRate() int64

func (*Miner) Mining

func (self *Miner) Mining() bool

func (*Miner) PendingBlock

func (self *Miner) PendingBlock() *types.Block

func (*Miner) PendingState

func (self *Miner) PendingState() *state.StateDB

func (*Miner) Register

func (self *Miner) Register(agent Agent)

func (*Miner) SetExtra

func (self *Miner) SetExtra(extra []byte)

func (*Miner) Start

func (self *Miner) Start(coinbase common.Address)

func (*Miner) Stop

func (self *Miner) Stop()

type RemoteAgent

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

func NewRemoteAgent

func NewRemoteAgent() *RemoteAgent

func (*RemoteAgent) GetHashRate

func (a *RemoteAgent) GetHashRate() int64

func (*RemoteAgent) GetWork

func (a *RemoteAgent) GetWork() [3]string

func (*RemoteAgent) SetReturnCh

func (a *RemoteAgent) SetReturnCh(returnCh chan<- *types.Block)

func (*RemoteAgent) Start

func (a *RemoteAgent) Start()

func (*RemoteAgent) Stop

func (a *RemoteAgent) Stop()

func (*RemoteAgent) SubmitWork

func (a *RemoteAgent) SubmitWork(nonce uint64, mixDigest, seedHash common.Hash) bool

func (*RemoteAgent) Work

func (a *RemoteAgent) Work() chan<- *types.Block

type Work

type Work struct {
	Number    uint64
	Nonce     uint64
	MixDigest []byte
	SeedHash  []byte
}

Jump to

Keyboard shortcuts

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