follower

package
v0.27.0-pre-release-1 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2022 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FollowerLogic

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

FollowerLogic runs in non-consensus nodes. It informs other components within the node about finalization of blocks. The consensus Follower consumes all block proposals broadcasts by the consensus node, verifies the block header and locally evaluates the finalization rules.

CAUTION: Follower is NOT CONCURRENCY safe

func New

func New(
	log zerolog.Logger,
	validator hotstuff.Validator,
	finalizationLogic forks.Finalizer,
) (*FollowerLogic, error)

New creates a new FollowerLogic instance

func (*FollowerLogic) AddBlock

func (f *FollowerLogic) AddBlock(blockProposal *model.Proposal) error

AddBlock processes the given block proposal

func (*FollowerLogic) FinalizedBlock

func (f *FollowerLogic) FinalizedBlock() *model.Block

FinalizedBlock returns the latest finalized block

Jump to

Keyboard shortcuts

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