Documentation ¶
Index ¶
- Variables
- func NewStateFactory(config blockSyncConfig, gossip gossiptopics.BlockSync, ...) *stateFactory
- func NewStateFactoryWithTimers(config blockSyncConfig, gossip gossiptopics.BlockSync, ...) *stateFactory
- type BlockSync
- func (bs *BlockSync) HandleBlockAvailabilityResponse(ctx context.Context, input *gossiptopics.BlockAvailabilityResponseInput) (*gossiptopics.EmptyOutput, error)
- func (bs *BlockSync) HandleBlockCommitted(ctx context.Context)
- func (bs *BlockSync) HandleBlockSyncResponse(ctx context.Context, input *gossiptopics.BlockSyncResponseInput) (*gossiptopics.EmptyOutput, error)
- func (bs *BlockSync) IsTerminated() bool
- type BlockSyncStorage
Constants ¶
This section is empty.
Variables ¶
View Source
var LogTag = log.String("flow", "block-sync")
Functions ¶
func NewStateFactory ¶
func NewStateFactory( config blockSyncConfig, gossip gossiptopics.BlockSync, storage BlockSyncStorage, conduit blockSyncConduit, logger log.BasicLogger, factory metric.Factory, ) *stateFactory
func NewStateFactoryWithTimers ¶
func NewStateFactoryWithTimers( config blockSyncConfig, gossip gossiptopics.BlockSync, storage BlockSyncStorage, conduit blockSyncConduit, createCollectTimeoutTimer func() *synchronization.Timer, createNoCommitTimeoutTimer func() *synchronization.Timer, createWaitForChunksTimeoutTimer func() *synchronization.Timer, logger log.BasicLogger, factory metric.Factory, ) *stateFactory
Types ¶
type BlockSync ¶
type BlockSync struct {
// contains filtered or unexported fields
}
func NewBlockSync ¶
func NewBlockSync(ctx context.Context, config blockSyncConfig, gossip gossiptopics.BlockSync, storage BlockSyncStorage, parentLogger log.BasicLogger, metricFactory metric.Factory) *BlockSync
func (*BlockSync) HandleBlockAvailabilityResponse ¶
func (bs *BlockSync) HandleBlockAvailabilityResponse(ctx context.Context, input *gossiptopics.BlockAvailabilityResponseInput) (*gossiptopics.EmptyOutput, error)
func (*BlockSync) HandleBlockCommitted ¶
func (*BlockSync) HandleBlockSyncResponse ¶
func (bs *BlockSync) HandleBlockSyncResponse(ctx context.Context, input *gossiptopics.BlockSyncResponseInput) (*gossiptopics.EmptyOutput, error)
func (*BlockSync) IsTerminated ¶ added in v0.7.11
type BlockSyncStorage ¶
type BlockSyncStorage interface { GetLastCommittedBlockHeight(ctx context.Context, input *services.GetLastCommittedBlockHeightInput) (*services.GetLastCommittedBlockHeightOutput, error) NodeSyncCommitBlock(ctx context.Context, input *services.CommitBlockInput) (*services.CommitBlockOutput, error) ValidateBlockForCommit(ctx context.Context, input *services.ValidateBlockForCommitInput) (*services.ValidateBlockForCommitOutput, error) UpdateConsensusAlgosAboutLastCommittedBlockInLocalPersistence(ctx context.Context) }
Click to show internal directories.
Click to hide internal directories.