consensus

package
v0.27.1 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2022 License: AGPL-3.0 Imports: 15 Imported by: 2 modules, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithBlockTimer added in v0.20.0

func WithBlockTimer(timer protocol.BlockTimer) func(*Config)

func WithMaxGuaranteeCount added in v0.13.0

func WithMaxGuaranteeCount(maxGuaranteeCount uint) func(*Config)

func WithMaxReceiptCount added in v0.14.0

func WithMaxReceiptCount(maxReceiptCount uint) func(*Config)

func WithMaxSealCount

func WithMaxSealCount(maxSealCount uint) func(*Config)

Types

type Builder

type Builder struct {
	// contains filtered or unexported fields
}

Builder is the builder for consensus block payloads. Upon providing a payload hash, it also memorizes which entities were included into the payload.

func NewBuilder

func NewBuilder(
	metrics module.MempoolMetrics,
	db *badger.DB,
	state protocol.MutableState,
	headers storage.Headers,
	seals storage.Seals,
	index storage.Index,
	blocks storage.Blocks,
	resultsDB storage.ExecutionResults,
	receiptsDB storage.ExecutionReceipts,
	guarPool mempool.Guarantees,
	sealPool mempool.IncorporatedResultSeals,
	recPool mempool.ExecutionTree,
	tracer module.Tracer,
	options ...func(*Config),
) (*Builder, error)

NewBuilder creates a new block builder.

func (*Builder) BuildOn

func (b *Builder) BuildOn(parentID flow.Identifier, setter func(*flow.Header) error) (*flow.Header, error)

BuildOn creates a new block header on top of the provided parent, using the given view and applying the custom setter function to allow the caller to make changes to the header before storing it.

type Config

type Config struct {
	// contains filtered or unexported fields
}

type InsertableReceipts added in v0.16.0

type InsertableReceipts struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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