statemanager

package
v0.4.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2022 License: Apache-2.0, BSD-2-Clause Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type StateMgr

type StateMgr interface {
	consGR.StateMgr
	// The StateMgr has to find a common ancestor for the prevAO and nextAO, then return
	// the state for Next ao and reject blocks in range (commonAO, prevAO]. The StateMgr
	// can determine relative positions of the corresponding blocks based on their state
	// indexes.
	MempoolStateRequest(
		ctx context.Context,
		prevAO, nextAO *isc.AliasOutputWithID,
	) <-chan *smInputs.MempoolStateRequestResults
	// Invoked by the chain when new confirmed alias output is received.
	// This event should be used to mark blocks as confirmed.
	ReceiveConfirmedAliasOutput(aliasOutput *isc.AliasOutputWithID) // TODO: Not used anymore, can be removed.
	// Invoked by the chain when a set of access nodes has changed.
	// These nodes should be used to perform block replication.
	AccessNodesUpdated(accessNodePubKeys []*cryptolib.PublicKey)
}

func New

func New(
	ctx context.Context,
	chainID isc.ChainID,
	me *cryptolib.PublicKey,
	peerPubKeys []*cryptolib.PublicKey,
	net peering.NetworkProvider,
	wal smGPAUtils.BlockWAL,
	store state.Store,
	log *logger.Logger,
	timersOpt ...smGPA.StateManagerTimers,
) (StateMgr, error)

Directories

Path Synopsis
TODO remove this nolint after the statemgr tests are fixed
TODO remove this nolint after the statemgr tests are fixed

Jump to

Keyboard shortcuts

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