builder

package
v1.14.1-db-metrics-fix Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2025 License: BSD-3-Clause Imports: 23 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrEndOfTime       = errors.New("program time is suspiciously far in the future")
	ErrNoPendingBlocks = errors.New("no pending blocks")
)

Functions

func NewRewardValidatorTx added in v1.11.0

func NewRewardValidatorTx(ctx *snow.Context, txID ids.ID) (*txs.Tx, error)

Types

type Builder

type Builder interface {
	smblock.BuildBlockWithContextChainVM
	// Add adds `tx` to the mempool and clears its dropped status.
	Add(tx *txs.Tx) error
	// Get returns the tx corresponding to `txID` and if it was present
	Get(txID ids.ID) (*txs.Tx, bool)
	// GetDropReason returns why `txID` was dropped
	GetDropReason(txID ids.ID) error
	// WaitForEvent blocks until the mempool has txs that are ready to build into
	// a block.
	WaitForEvent(ctx context.Context) (common.Message, error)

	// BuildBlock can be called to attempt to create a new block
	BuildBlock(context.Context) (snowman.Block, error)

	// PackAllBlockTxs returns an array of all txs that could be packed into a
	// valid block of infinite size. The returned txs are all verified against
	// the preferred state.
	//
	// Note: This function does not call the consensus engine.
	PackAllBlockTxs() ([]*txs.Tx, error)
}

func New

func New(
	mempool *mempool.Mempool,
	txExecutorBackend *txexecutor.Backend,
	blkManager blockexecutor.Manager,
) Builder

Jump to

Keyboard shortcuts

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