package
1.9.6
Repository: https://github.com/decred/dcrd.git
Documentation: pkg.go.dev

# README

netsync

Build Status ISC License Doc

Package netsync implements a concurrency safe block syncing protocol.

Overview

The provided implementation of SyncManager communicates with connected peers to perform an initial block download, keep the chain in sync, and announce new blocks connected to the chain. Currently the sync manager selects a single sync peer that it downloads all blocks from until it is up to date with the longest chain the sync peer is aware of.

License

Package netsync is licensed under the copyfree ISC License.

# Functions

New returns a new network chain synchronization manager.
NewPeer returns a new instance of a peer that wraps the provided underlying common peer with additional state that is used throughout the package.
UseLogger uses a specified Logger to output package logging info.

# Structs

Config holds the configuration options related to the network chain synchronization manager.
Peer extends a common peer to maintain additional state needed by the sync manager.
SyncManager provides a concurrency safe sync manager for handling all incoming blocks.

# Interfaces

PeerNotifier provides an interface to notify peers of status changes related to blocks and transactions.