factory

package
v1.7.13-patch2 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2024 License: GPL-3.0 Imports: 9 Imported by: ? modules, 0 packages

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 CreateTriesComponentsForShardId

func CreateTriesComponentsForShardId(
	generalConfig config.Config,
	coreComponentsHolder coreComponentsHandler,
	storageService dataRetriever.StorageService,
	stateStatsHandler common.StateStatisticsHandler,
) (common.TriesHolder, map[string]common.StorageManager, error)

CreateTriesComponentsForShardId creates the user and peer tries and trieStorageManagers

func NewTrieFactory

func NewTrieFactory(
	args TrieFactoryArgs,
) (*trieCreator, error)

NewTrieFactory creates a new trie factory

func NewTrieNodeFactory

func NewTrieNodeFactory() *trieNodeFactory

NewTrieNodeFactory creates a new trieNodeFactory

Types

type TrieCreateArgs

type TrieCreateArgs struct {
	MainStorer          storage.Storer
	PruningEnabled      bool
	SnapshotsEnabled    bool
	MaxTrieLevelInMem   uint
	IdleProvider        trie.IdleNodeProvider
	Identifier          string
	EnableEpochsHandler common.EnableEpochsHandler
	StatsCollector      common.StateStatisticsHandler
}

TrieCreateArgs holds arguments for calling the Create method on the TrieFactory

type TrieFactoryArgs

type TrieFactoryArgs struct {
	Marshalizer              marshal.Marshalizer
	Hasher                   hashing.Hasher
	PathManager              storage.PathManagerHandler
	TrieStorageManagerConfig config.TrieStorageManagerConfig
	StateStatsHandler        common.StateStatisticsHandler
}

TrieFactoryArgs holds the arguments for creating a trie factory

Jump to

Keyboard shortcuts

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