miner

package
v2.10.2+incompatible Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2021 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DownloaderRegister

type DownloaderRegister func(chan<- int) // 0 represent success, not 0 represent failed.

type Miner

type Miner interface {
	Init()
	Start()
	Stop()
}

func NewMiner

func NewMiner(chain SnapshotChainRW, syncStatus face.SyncStatus, bus EventBus.Bus, coinbase common.Address, con consensus.Consensus) Miner

type MinerLifecycle

type MinerLifecycle struct {
	common.LifecycleStatus
}

*

0->1->2->3->4->5->6->7->8

^|_______\

0:origin 1: initing 2:inited 3:starting 4:started 5:stopping 6:stopped 7:destroying 8:destroyed

func (*MinerLifecycle) PostDestroy

func (l *MinerLifecycle) PostDestroy() bool

func (*MinerLifecycle) PostStart

func (l *MinerLifecycle) PostStart() bool

func (*MinerLifecycle) PreDestroy

func (l *MinerLifecycle) PreDestroy() bool

func (*MinerLifecycle) PreStart

func (l *MinerLifecycle) PreStart() bool

type SnapshotChainRW

type SnapshotChainRW interface {
	MiningSnapshotBlock(address common.Address, timestamp int64) error
}

Backend wraps all methods required for mining.

Jump to

Keyboard shortcuts

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