Documentation
¶
Index ¶
Constants ¶
View Source
const ( DataRequestEntryLimit = 20 DataRequestNodeLimit = 3 DataRequestNodeInterval = time.Millisecond * 300 DataRequestRoundInterval = time.Second * 3 )
View Source
const ( NoError errCode = iota ErrTimeExpired ErrNoData )
Variables ¶
This section is empty.
Functions ¶
func PeerIDToKey ¶
Types ¶
type BucketIDAndBytes ¶
func (BucketIDAndBytes) String ¶
func (b BucketIDAndBytes) String() string
type DataHandler ¶
type DataHandler func(reqID uint32, sender *peer, data []BucketIDAndBytes)
type DataSender ¶
type DataSender interface {
RequestData(peer module.PeerID, reqID uint32, reqData []BucketIDAndBytes) error
}
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func NewSyncManager ¶
func (*Manager) UnresolvedRequestCount ¶
type PeerWatcher ¶
type PeerWatcher interface {
OnPeerJoin(p *peer)
OnPeerLeave(p *peer)
}
type Platform ¶
type Platform interface {
NewExtensionWithBuilder(builder merkle.Builder, raw []byte) state.ExtensionSnapshot
}
type ProgressCallback ¶ added in v1.3.2
type ReactorCommon ¶
type ReactorCommon struct {
// contains filtered or unexported fields
}
func (*ReactorCommon) GetVersion ¶
func (r *ReactorCommon) GetVersion() byte
func (*ReactorCommon) OnJoin ¶
func (r *ReactorCommon) OnJoin(id module.PeerID)
func (*ReactorCommon) OnLeave ¶
func (r *ReactorCommon) OnLeave(id module.PeerID)
func (*ReactorCommon) UnwatchPeers ¶
func (r *ReactorCommon) UnwatchPeers(watcher PeerWatcher) bool
func (*ReactorCommon) WatchPeers ¶
func (r *ReactorCommon) WatchPeers(watcher PeerWatcher) []*peer
type ReactorV1 ¶
type ReactorV1 struct {
ReactorCommon
// contains filtered or unexported fields
}
func (*ReactorV1) RequestData ¶
type ReactorV2 ¶
type ReactorV2 struct {
ReactorCommon
// contains filtered or unexported fields
}
func (*ReactorV2) RequestData ¶
type Result ¶
type Result struct {
Wss state.WorldSnapshot
PatchReceipts module.ReceiptList
NormalReceipts module.ReceiptList
BTPDigest module.BTPDigest
}
type SyncProcessor ¶
type SyncReactor ¶
type SyncReactor interface {
GetVersion() byte
WatchPeers(watcher PeerWatcher) []*peer
UnwatchPeers(watcher PeerWatcher) bool
}
Click to show internal directories.
Click to hide internal directories.