Skip to content
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions epochStart/interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ type TriggerHandler interface {
IsInterfaceNil() bool
}

// BootstrapCompletedNotifier handles completion of storage bootstrap.
type BootstrapCompletedNotifier interface {
OnBootstrapCompleted()
}

// RoundHandler defines the actions which should be handled by a round implementation
type RoundHandler interface {
// Index returns the current round
Expand All @@ -59,7 +64,9 @@ type HeaderValidator interface {
type RequestHandler interface {
RequestShardHeader(shardId uint32, hash []byte)
RequestMetaHeader(hash []byte)
RequestMetaHeaderForEpoch(hash []byte, epoch uint32)
RequestMetaHeaderByNonce(nonce uint64)
RequestMetaHeaderByNonceForEpoch(nonce uint64, epoch uint32)
RequestShardHeaderByNonce(shardId uint32, nonce uint64)
RequestStartOfEpochMetaBlock(epoch uint32)
RequestMiniBlocks(destShardID uint32, miniblocksHashes [][]byte)
Expand Down
12 changes: 10 additions & 2 deletions epochStart/mock/validatorInfoSyncerStub.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,23 @@ import (

// ValidatorInfoSyncerStub -
type ValidatorInfoSyncerStub struct {
SyncMiniBlocksCalled func(header data.HeaderHandler) ([][]byte, data.BodyHandler, error)
SyncValidatorsInfoCalled func(body data.BodyHandler) ([][]byte, map[string]*state.ShardValidatorInfo, error)
}

// SyncMiniBlocks -
func (vip *ValidatorInfoSyncerStub) SyncMiniBlocks(_ data.HeaderHandler) ([][]byte, data.BodyHandler, error) {
func (vip *ValidatorInfoSyncerStub) SyncMiniBlocks(header data.HeaderHandler) ([][]byte, data.BodyHandler, error) {
if vip.SyncMiniBlocksCalled != nil {
return vip.SyncMiniBlocksCalled(header)
}
return nil, nil, nil
}

// SyncValidatorsInfo -
func (vip *ValidatorInfoSyncerStub) SyncValidatorsInfo(_ data.BodyHandler) ([][]byte, map[string]*state.ShardValidatorInfo, error) {
func (vip *ValidatorInfoSyncerStub) SyncValidatorsInfo(body data.BodyHandler) ([][]byte, map[string]*state.ShardValidatorInfo, error) {
if vip.SyncValidatorsInfoCalled != nil {
return vip.SyncValidatorsInfoCalled(body)
}
return nil, nil, nil
}

Expand Down
Loading
Loading