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 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.
Click to show internal directories.
Click to hide internal directories.