sposFactory

package
v1.7.14 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2024 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidConsensusType = errors.New("invalid consensus type")

ErrInvalidConsensusType signals that an invalid consensus type has been provided

View Source
var ErrInvalidShardId = errors.New("invalid shard id")

ErrInvalidShardId signals that an invalid shard id has been provided

Functions

func GetBroadcastMessenger

func GetBroadcastMessenger(
	marshalizer marshal.Marshalizer,
	hasher hashing.Hasher,
	messenger consensus.P2PMessenger,
	shardCoordinator sharding.Coordinator,
	peerSignatureHandler crypto.PeerSignatureHandler,
	headersSubscriber consensus.HeadersPoolSubscriber,
	interceptorsContainer process.InterceptorsContainer,
	alarmScheduler core.TimersScheduler,
	keysHandler consensus.KeysHandler,
) (consensus.BroadcastMessenger, error)

GetBroadcastMessenger returns a consensus service depending on the given parameter

func GetConsensusCoreFactory

func GetConsensusCoreFactory(consensusType string) (spos.ConsensusService, error)

GetConsensusCoreFactory returns a consensus service depending on the given parameter

func GetSubroundsFactory

func GetSubroundsFactory(
	consensusDataContainer spos.ConsensusCoreHandler,
	consensusState *spos.ConsensusState,
	worker spos.WorkerHandler,
	consensusType string,
	appStatusHandler core.AppStatusHandler,
	outportHandler outport.OutportHandler,
	sentSignatureTracker spos.SentSignaturesTracker,
	chainID []byte,
	currentPid core.PeerID,
) (spos.SubroundsFactory, error)

GetSubroundsFactory returns a subrounds factory depending on the given parameter

Types

This section is empty.

Jump to

Keyboard shortcuts

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