miner

package
v0.0.23 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2019 License: GPL-3.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

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

API exposes dpos related methods for the RPC interface.

func (*API) Force added in v0.0.7

func (api *API) Force() bool

func (*API) Mining

func (api *API) Mining() bool

func (*API) SetCoinbase

func (api *API) SetCoinbase(name string, privKeys []string) error

func (*API) SetDelay added in v0.0.20

func (api *API) SetDelay(delayDuration uint64) error

func (*API) SetExtra

func (api *API) SetExtra(extra string) error

func (*API) Start

func (api *API) Start() bool

func (*API) Stop

func (api *API) Stop() bool

type Miner

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

Miner creates blocks and searches for proof values.

func NewMiner

func NewMiner(consensus consensus.IConsensus) *Miner

NewMiner creates a miner.

func (*Miner) APIs

func (miner *Miner) APIs(chain consensus.IChainReader) []rpc.API

func (*Miner) Mining

func (miner *Miner) Mining() bool

Mining wroker is wroking

func (*Miner) SetCoinbase

func (miner *Miner) SetCoinbase(name string, privKeys []string) error

SetCoinbase coinbase name & private key

func (*Miner) SetDelayDuration added in v0.0.18

func (miner *Miner) SetDelayDuration(delayDuration uint64) error

func (*Miner) SetExtra

func (miner *Miner) SetExtra(extra []byte) error

SetExtra extra data

func (*Miner) Start

func (miner *Miner) Start(force bool) bool

Start start worker

func (*Miner) Stop

func (miner *Miner) Stop() bool

Stop stop worker

type Work

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

type Worker

type Worker struct {
	consensus.IConsensus
	// contains filtered or unexported fields
}

Worker is the main object which takes care of applying messages to the new state

Jump to

Keyboard shortcuts

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