producer

package
v2.9.0+incompatible Latest Latest
Warning

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

Go to latest
Published: May 13, 2020 License: GPL-3.0 Imports: 20 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewProducer

func NewProducer(rw chain.Chain,
	subscriber net.Subscriber,
	coinbase *AddressContext,
	cs consensus.Subscriber,
	verifier *verifier.SnapshotVerifier,
	wt *wallet.Manager,
	p pool.SnapshotProducerWriter) *producer

todo syncDone

Types

type AddressContext

type AddressContext struct {
	EntryPath string
	Address   types.Address
	Index     uint32
}

type DownloaderRegister

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

type Producer

type Producer interface {
	SetAccountEventFunc(func(producerevent.AccountEvent))
	Init() error
	Start() error
	Stop() error
	GetCoinBase() types.Address
}

type SnapshotChainRW

type SnapshotChainRW interface {
	WriteMiningBlock(block *ledger.SnapshotBlock) error
}

Backend wraps all methods required for mining.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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