Documentation ¶
Index ¶
Constants ¶
View Source
const ( RootBlockHeaderListLimit = 500 RootBlockBatchSize = 100 MinorBlockHeaderListLimit = 100 //TODO 100 50 MinorBlockBatchSize = 50 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Synchronizer ¶
Synchronizer will sync blocks for the master server when receiving new root blocks from peers.
func NewSynchronizer ¶
func NewSynchronizer(bc blockchain) Synchronizer
NewSynchronizer returns a new synchronizer instance.
type Task ¶
Task represents a synchronization task for the synchronizer.
func NewMinorChainTask ¶
func NewMinorChainTask( p minorSyncerPeer, header *types.MinorBlockHeader, ) Task
NewMinorChainTask returns a sync task for minor chain.
func NewRootChainTask ¶
func NewRootChainTask( p rootSyncerPeer, header *types.RootBlockHeader, statusChan chan *rpc.ShardStatus, getShardConnFunc func(fullShardId uint32) []rpc.ShardConnForP2P, ) Task
NewRootChainTask returns a sync task for root chain.
Click to show internal directories.
Click to hide internal directories.