sync

package
v1.6.16 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2024 License: GPL-3.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDataFromStorage

func GetDataFromStorage(hash []byte, storer update.HistoryStorer) ([]byte, error)

GetDataFromStorage searches for data from storage

func NewHeadersSyncHandler

func NewHeadersSyncHandler(args ArgsNewHeadersSyncHandler) (*headersToSync, error)

NewHeadersSyncHandler creates a new header syncer

func NewMissingheadersByHashSyncer

func NewMissingheadersByHashSyncer(args ArgsNewMissingHeadersByHashSyncer) (*syncHeadersByHash, error)

NewMissingheadersByHashSyncer creates a syncer for all missing headers

func NewPendingMiniBlocksSyncer

func NewPendingMiniBlocksSyncer(args ArgsNewPendingMiniBlocksSyncer) (*pendingMiniBlocks, error)

NewPendingMiniBlocksSyncer creates a syncer for all pending miniblocks

func NewSyncAccountsDBsHandler

func NewSyncAccountsDBsHandler(args ArgsNewSyncAccountsDBsHandler) (*syncAccountsDBs, error)

NewSyncAccountsDBsHandler creates a new syncAccountsDBs

func NewSyncState

func NewSyncState(args ArgsNewSyncState) (*syncState, error)

NewSyncState creates a complete syncer which saves the state of the blockchain with pending values as well

func NewTransactionsSyncer

func NewTransactionsSyncer(args ArgsNewTransactionsSyncer) (*transactionsSync, error)

NewTransactionsSyncer creates a new transactions syncer

func WaitFor

func WaitFor(channel chan bool, waitTime time.Duration) error

WaitFor waits for the channel to be set or for timeout

Types

type ArgsNewHeadersSyncHandler

type ArgsNewHeadersSyncHandler struct {
	StorageService   dataRetriever.StorageService
	Cache            dataRetriever.HeadersPool
	Marshalizer      marshal.Marshalizer
	Hasher           hashing.Hasher
	EpochHandler     update.EpochStartVerifier
	RequestHandler   process.RequestHandler
	Uint64Converter  typeConverters.Uint64ByteSliceConverter
	ShardCoordinator sharding.Coordinator
}

ArgsNewHeadersSyncHandler defines the arguments needed for the new header syncer

type ArgsNewMissingHeadersByHashSyncer

type ArgsNewMissingHeadersByHashSyncer struct {
	Storage        storage.Storer
	Cache          dataRetriever.HeadersPool
	Marshalizer    marshal.Marshalizer
	RequestHandler process.RequestHandler
}

ArgsNewMissingHeadersByHashSyncer defines the arguments needed for the sycner

type ArgsNewPendingMiniBlocksSyncer

type ArgsNewPendingMiniBlocksSyncer struct {
	Storage        storage.Storer
	Cache          storage.Cacher
	Marshalizer    marshal.Marshalizer
	RequestHandler process.RequestHandler
}

ArgsNewPendingMiniBlocksSyncer defines the arguments needed for the sycner

type ArgsNewSyncAccountsDBsHandler

type ArgsNewSyncAccountsDBsHandler struct {
	AccountsDBsSyncers update.AccountsDBSyncContainer
	ActiveAccountsDBs  map[state.AccountsDbIdentifier]state.AccountsAdapter
}

ArgsNewSyncAccountsDBsHandler is the argument structured to create a sync tries handler

type ArgsNewSyncState

ArgsNewSyncState defines the arguments for the new sync state

type ArgsNewTransactionsSyncer

type ArgsNewTransactionsSyncer struct {
	DataPools      dataRetriever.PoolsHolder
	Storages       dataRetriever.StorageService
	Marshaller     marshal.Marshalizer
	RequestHandler process.RequestHandler
}

ArgsNewTransactionsSyncer defines the arguments needed for a new transactions syncer

Jump to

Keyboard shortcuts

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