dcrd/internal/netsync
Dave Collins 715aa0c77b
rpcserver/netsync: Remove notifystakedifficulty.
This removes support from the RPC server for the notifystakedifficulty
and related stakedifficulty notification.

This is being done because it really is not necessary, as evidenced by
the fact that nothing actually uses it, and as further described below.

The only time the stake difficulty can change is when there is a new
block that falls on a well defined interval, so all clients already know
when it can possibly change and can make use of getstakedifficulty at
the appropriate times if they really need access to it.

Moreover, since the activation of DCP0001, it became possible to
independently calculate the stake difficulty from the headers alone, so
SPV clients that don't rely on RPC, such as wallets, already calculate
it themselves anyway.

In practice, wallets would be the only realistic potential consumer for
such a notification, but for the aforementioned reasons, they really
have no need for it.

Finally, I noticed that the current code was not even notifying under
all of the correct circumstances.  So, rather than fixing and
maintaining a bunch of code that isn't particularly useful, it's better
to just remove it.
2020-12-28 18:26:54 -06:00
..
doc.go netsync: Add package documentation. 2020-12-15 13:26:57 -06:00
interface.go multi: Start dcrutil v4 module dev cycle. 2020-12-16 16:30:24 -06:00
log.go netsync: Split blockmanager into separate package. 2020-12-15 13:26:30 -06:00
manager.go rpcserver/netsync: Remove notifystakedifficulty. 2020-12-28 18:26:54 -06:00
README.md netsync: Add package documentation. 2020-12-15 13:26:57 -06:00

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.