Documentation ¶
Index ¶
- func GetDataFromStorage(hash []byte, storer update.HistoryStorer) ([]byte, error)
- func NewHeadersSyncHandler(args ArgsNewHeadersSyncHandler) (*headersToSync, error)
- func NewMissingheadersByHashSyncer(args ArgsNewMissingHeadersByHashSyncer) (*syncHeadersByHash, error)
- func NewPendingMiniBlocksSyncer(args ArgsNewPendingMiniBlocksSyncer) (*pendingMiniBlocks, error)
- func NewPendingTransactionsSyncer(args ArgsNewPendingTransactionsSyncer) (*pendingTransactions, error)
- func NewSyncAccountsDBsHandler(args ArgsNewSyncAccountsDBsHandler) (*syncAccountsDBs, error)
- func NewSyncState(args ArgsNewSyncState) (*syncState, error)
- func WaitFor(channel chan bool, waitTime time.Duration) error
- type ArgsNewHeadersSyncHandler
- type ArgsNewMissingHeadersByHashSyncer
- type ArgsNewPendingMiniBlocksSyncer
- type ArgsNewPendingTransactionsSyncer
- type ArgsNewSyncAccountsDBsHandler
- type ArgsNewSyncState
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 NewPendingTransactionsSyncer ¶
func NewPendingTransactionsSyncer(args ArgsNewPendingTransactionsSyncer) (*pendingTransactions, error)
NewPendingTransactionsSyncer creates a new transactions syncer
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
Types ¶
type ArgsNewHeadersSyncHandler ¶
type ArgsNewHeadersSyncHandler struct { StorageService dataRetriever.StorageService Cache dataRetriever.HeadersPool Marshalizer marshal.Marshalizer EpochHandler update.EpochStartVerifier RequestHandler process.RequestHandler Uint64Converter typeConverters.Uint64ByteSliceConverter }
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 ArgsNewPendingTransactionsSyncer ¶
type ArgsNewPendingTransactionsSyncer struct { DataPools dataRetriever.PoolsHolder Storages dataRetriever.StorageService Marshalizer marshal.Marshalizer RequestHandler process.RequestHandler }
ArgsNewPendingTransactionsSyncer defines the arguments needed for a new transactions syncer
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 ¶
type ArgsNewSyncState struct { Headers update.HeaderSyncHandler Tries update.EpochStartTriesSyncHandler MiniBlocks update.EpochStartPendingMiniBlocksSyncHandler Transactions update.PendingTransactionsSyncHandler }
ArgsNewSyncState defines the arguments for the new sync state