miner

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2021 License: LGPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backend

type Backend interface {
	BlockChain() *core.BlockChain
	TxPool() *core.TxPool
}

type Miner

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

func NewMiner

func NewMiner(you Backend, mux *event.TypeMux, engine consensus.Engine, nodeConfig *node.Config) *Miner

func (*Miner) Close

func (m *Miner) Close()

func (*Miner) Mining

func (m *Miner) Mining() bool

func (*Miner) Pending

func (m *Miner) Pending() (*types.Block, *state.StateDB)

Pending returns the currently pending block and associated state.

func (*Miner) PendingBlock

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

func (*Miner) SetExtra

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

func (*Miner) Start

func (m *Miner) Start()

func (*Miner) Stop

func (m *Miner) Stop()

type NewMinedBlockSubscriber

type NewMinedBlockSubscriber interface {
	SubscribeNewMinedBlockEvent(chan core.NewMinedBlockEvent) event.Subscription
}

Jump to

Keyboard shortcuts

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