factory

package
v1.3.10 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2022 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const PeerAccountTrie = "peerAccount"

PeerAccountTrie represents the peer account identifier

View Source
const UserAccountTrie = "userAccount"

UserAccountTrie represents the use account identifier

Variables

This section is empty.

Functions

func CreateTriesComponentsForShardId added in v1.3.0

func CreateTriesComponentsForShardId(
	generalConfig config.Config,
	coreComponentsHolder coreComponentsHandler,
	shardId uint32,
	storageService dataRetriever.StorageService,
	disableoOldTrieStorageEpoch uint32,
	notifier trie.EpochNotifier,
) (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 {
	TrieStorageConfig          config.StorageConfig
	MainStorer                 storage.Storer
	CheckpointsStorer          storage.Storer
	ShardID                    string
	PruningEnabled             bool
	CheckpointsEnabled         bool
	MaxTrieLevelInMem          uint
	DisableOldTrieStorageEpoch uint32
	EpochStartNotifier         trie.EpochNotifier
}

TrieCreateArgs holds arguments for calling the Create method on the TrieFactory

type TrieFactoryArgs

type TrieFactoryArgs struct {
	SnapshotDbCfg            config.DBConfig
	Marshalizer              marshal.Marshalizer
	Hasher                   hashing.Hasher
	PathManager              storage.PathManagerHandler
	TrieStorageManagerConfig config.TrieStorageManagerConfig
}

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