Documentation
¶
Overview ¶
TODO: remove this file when we can import it from hostd
Index ¶
- Variables
- func NewAutopilot(cfg AutopilotConfig, b autopilot.Bus, workers []autopilot.Worker, ...) (http.Handler, RunFn, ShutdownFn, error)
- func NewChainManager(cs modules.ConsensusSet, network *consensus.Network) (*chainManager, error)
- func NewLogger(path string) (*zap.Logger, func(context.Context) error, error)
- func NewTransactionPool(tp modules.TransactionPool) bus.TransactionPool
- type AutopilotConfig
- type BusConfig
- type Consensus
- type Miner
- type RunFn
- type ShutdownFn
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrBlockNotFound = errors.New("block not found") ErrInvalidChangeID = errors.New("invalid change id") )
Functions ¶
func NewAutopilot ¶
func NewChainManager ¶ added in v0.7.0
func NewChainManager(cs modules.ConsensusSet, network *consensus.Network) (*chainManager, error)
NewManager creates a new chain manager.
func NewTransactionPool ¶ added in v0.7.0
func NewTransactionPool(tp modules.TransactionPool) bus.TransactionPool
Types ¶
type AutopilotConfig ¶
type Consensus ¶
Consensus defines a minimal interface needed by the miner to interact with the consensus set
type Miner ¶
type Miner struct {
// contains filtered or unexported fields
}
A Miner is a CPU miner that can mine blocks, sending the reward to a specified address.
func (*Miner) ProcessConsensusChange ¶
func (m *Miner) ProcessConsensusChange(cc modules.ConsensusChange)
ProcessConsensusChange implements modules.ConsensusSetSubscriber.
func (*Miner) ReceiveUpdatedUnconfirmedTransactions ¶
func (m *Miner) ReceiveUpdatedUnconfirmedTransactions(diff *modules.TransactionPoolDiff)
ReceiveUpdatedUnconfirmedTransactions implements modules.TransactionPoolSubscriber
type ShutdownFn ¶
Click to show internal directories.
Click to hide internal directories.