isync

package
v0.0.0-...-4f0ab6e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 29, 2021 License: MIT Imports: 3 Imported by: 2

Documentation

Overview

Package isync defines the interface of sync

Index

Constants

View Source
const (
	// MaxSyncHeadersPerMsg is the max number of message that a peer chould sync
	MaxSyncHeadersPerMsg = 10
)

Variables

This section is empty.

Functions

This section is empty.

Types

type SyncManager

type SyncManager interface {
	// Start will start the processing of sync management.
	Start()

	// AcceptMsg accepts a new message and maybe act on it.
	AcceptMsg(msg wire.Message)

	// Notifies SyncManager to request a sync, whether or not a sync will actually happen depending on internal logic.
	MaybeSync()

	// TODO(huangsz): Remove these peer relevant interfaces when p2p refactor is done, we shall register a listener
	// to PeerManager instead.
	OnNewPeer(cp *connection.ConnPeer, t config.NodeType)
	OnPeerDone(cp *connection.ConnPeer, t config.NodeType)
}

SyncManager used to sync header or block from peer

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL