producer

package
v0.0.0-...-96daba7 Latest Latest
Warning

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

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

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