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 NewBus(cfg BusConfig, dir string, seed types.PrivateKey, l *zap.Logger) (http.Handler, BusSetupFn, ShutdownFn, error)
- func NewChainManager(cs modules.ConsensusSet, tp bus.TransactionPool, network *consensus.Network) (*chainManager, error)
- func NewTransactionPool(tp modules.TransactionPool) bus.TransactionPool
- func NewWorker(cfg config.Worker, s3Opts s3.Opts, b Bus, seed types.PrivateKey, l *zap.Logger) (http.Handler, http.Handler, WorkerSetupFn, ShutdownFn, error)
- type AutopilotConfig
- type Bus
- type BusConfig
- type BusSetupFn
- type Consensus
- type Miner
- type RunFn
- type ShutdownFn
- type WorkerSetupFn
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrBlockNotFound = errors.New("block not found") ErrInvalidChangeID = errors.New("invalid change id") )
View Source
var NoopFn = func(context.Context) error { return nil }
Functions ¶
func NewAutopilot ¶
func NewBus ¶
func NewBus(cfg BusConfig, dir string, seed types.PrivateKey, l *zap.Logger) (http.Handler, BusSetupFn, ShutdownFn, error)
func NewChainManager ¶ added in v0.7.0
func NewChainManager(cs modules.ConsensusSet, tp bus.TransactionPool, 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 BusSetupFn ¶ added in v1.0.8
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.