Help us shape the future of Go! Take the 2026 Go Developer Survey

snowman

package
v1.20.1 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2025 License: BSD-3-Clause Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	common.AllGetsServer

	Ctx                 *snow.ConsensusContext
	VM                  block.ChainVM
	Sender              common.Sender
	Validators          validators.Manager
	ConnectedValidators tracker.Peers
	Params              snowball.Parameters
	Consensus           snowman.Consensus
	PartialSync         bool
}

Config wraps all the parameters needed for a snowman engine

type Engine

type Engine struct {
	Config

	// list of NoOpsHandler for messages dropped by engine
	common.StateSummaryFrontierHandler
	common.AcceptedStateSummaryHandler
	common.AcceptedFrontierHandler
	common.AcceptedHandler
	common.AncestorsHandler
	common.AppHandler
	validators.Connector
	// contains filtered or unexported fields
}

Engine implements the Engine interface by attempting to fetch all Engine dependencies.

func New added in v1.11.10

func New(config Config) (*Engine, error)

func (*Engine) Chits added in v1.13.3

func (e *Engine) Chits(ctx context.Context, nodeID ids.NodeID, requestID uint32, preferredID ids.ID, preferredIDAtHeight ids.ID, acceptedID ids.ID, acceptedHeight uint64) error

func (*Engine) Context added in v1.13.3

func (e *Engine) Context() *snow.ConsensusContext

func (*Engine) GetFailed added in v1.13.3

func (e *Engine) GetFailed(ctx context.Context, nodeID ids.NodeID, requestID uint32) error

func (*Engine) Gossip added in v1.13.3

func (e *Engine) Gossip(ctx context.Context) error

func (*Engine) HealthCheck added in v1.13.3

func (e *Engine) HealthCheck(ctx context.Context) (interface{}, error)

func (*Engine) Notify added in v1.13.3

func (e *Engine) Notify(ctx context.Context, msg common.Message) error

func (*Engine) PullQuery added in v1.13.3

func (e *Engine) PullQuery(ctx context.Context, nodeID ids.NodeID, requestID uint32, blkID ids.ID, requestedHeight uint64) error

func (*Engine) PushQuery added in v1.13.3

func (e *Engine) PushQuery(ctx context.Context, nodeID ids.NodeID, requestID uint32, blkBytes []byte, requestedHeight uint64) error

func (*Engine) Put added in v1.13.3

func (e *Engine) Put(ctx context.Context, nodeID ids.NodeID, requestID uint32, blkBytes []byte) error

func (*Engine) QueryFailed added in v1.13.3

func (e *Engine) QueryFailed(ctx context.Context, nodeID ids.NodeID, requestID uint32) error

func (*Engine) Shutdown added in v1.13.3

func (e *Engine) Shutdown(ctx context.Context) error

func (*Engine) Start added in v1.13.3

func (e *Engine) Start(ctx context.Context, startReqID uint32) error

type EngineTest added in v1.11.10

type EngineTest struct {
	*Engine

	CantGetBlock bool
	GetBlockF    func(context.Context, ids.ID) (snowman.Block, error)
}

EngineTest is a test engine

func (*EngineTest) Default added in v1.11.10

func (e *EngineTest) Default(cant bool)

func (*EngineTest) GetBlock added in v1.11.10

func (e *EngineTest) GetBlock(ctx context.Context, blkID ids.ID) (snowman.Block, error)

Directories

Path Synopsis
Package block is a generated GoMock package.
Package block is a generated GoMock package.
blockmock
Package blockmock is a generated GoMock package.
Package blockmock is a generated GoMock package.
mocks
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.
Package job provides a Scheduler to manage and execute Jobs with dependencies.
Package job provides a Scheduler to manage and execute Jobs with dependencies.

Jump to

Keyboard shortcuts

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