Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Generator ¶ added in v1.0.0
type Generator struct {
// contains filtered or unexported fields
}
Generator generates a block from proposals.
func NewGenerator ¶ added in v1.0.0
func NewGenerator(atxDB atxProvider, meshDB meshProvider, opts ...GeneratorOpt) *Generator
NewGenerator creates new block generator.
type GeneratorOpt ¶ added in v1.0.0
type GeneratorOpt func(h *Generator)
GeneratorOpt for configuring BlockHandler.
func WithConfig ¶ added in v1.0.0
func WithConfig(cfg RewardConfig) GeneratorOpt
WithConfig defines cfg for Generator.
func WithGeneratorLogger ¶ added in v1.0.0
func WithGeneratorLogger(logger log.Log) GeneratorOpt
WithGeneratorLogger defines logger for Generator.
type Handler ¶ added in v1.0.0
type Handler struct {
// contains filtered or unexported fields
}
Handler processes Block fetched from peers during sync.
func NewHandler ¶ added in v1.0.0
NewHandler creates new Handler.
type Opt ¶ added in v1.0.0
type Opt func(*Handler)
Opt for configuring BlockHandler.
func WithLogger ¶ added in v1.0.0
WithLogger defines logger for Handler.
type RewardConfig ¶
type RewardConfig struct {
BaseReward uint64 `mapstructure:"base-reward"`
}
RewardConfig defines the configuration options for Spacemesh rewards.
func DefaultRewardConfig ¶
func DefaultRewardConfig() RewardConfig
DefaultRewardConfig returns the default RewardConfig.
Click to show internal directories.
Click to hide internal directories.