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
Click to show internal directories.
Click to hide internal directories.