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. |
||
|---|---|---|
| .. | ||
| doc.go | ||
| interface.go | ||
| log.go | ||
| manager.go | ||
| README.md | ||
netsync
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.