miner

package
v0.0.0-...-163fc3c Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2021 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TypeSyncMiner = "sync"
)

Variables

View Source
var (
	ErrNoPayoutAddresses = errors.New("can not mine without payout addresses")
)

Functions

func NewSyncMiner

func NewSyncMiner(args ...interface{}) (pocminer.PoCMiner, error)

Types

type Chain

type Chain interface {
	BestBlockNode() *blockchain.BlockNode
	BestBlockHash() *wire.Hash
	BestBlockHeight() uint64
	ProcessBlock(*chainutil.Block) (bool, error)
	ChainID() *wire.Hash
	BlockWaiter(height uint64) (<-chan *blockchain.BlockNode, error)
	NewBlockTemplate(chainutil.Address, chan interface{}) error
}

type PoCMiner

type PoCMiner struct {
	*service.BaseService

	SpaceKeeper spacekeeper.SpaceKeeper
	// contains filtered or unexported fields
}

func NewPoCMiner

func NewPoCMiner(name string, allowSolo bool, chain Chain, syncManager SyncManager, sk spacekeeper.SpaceKeeper, newBlockCh chan *wire.Hash, payoutAddresses []chainutil.Address) *PoCMiner

func (*PoCMiner) OnStart

func (m *PoCMiner) OnStart() error

func (*PoCMiner) OnStop

func (m *PoCMiner) OnStop() error

func (*PoCMiner) SetPayoutAddresses

func (m *PoCMiner) SetPayoutAddresses(addresses []chainutil.Address) error

func (*PoCMiner) Type

func (m *PoCMiner) Type() string

type ProofTemplate

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

type SyncManager

type SyncManager interface {
	IsCaughtUp() bool
	PeerCount() int
}

Jump to

Keyboard shortcuts

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