Remove altcoin Network implementations #767
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR removes the Network implementations of dash, doge, litecoin, viacoin, and zcash. We added the NetworkInterface early on so people could 'bring their own' implementations when using the project, but in hindsight I don't think we should have accepted extra implementations into the repo.
The motivation for this is there have been a bunch of PR's to change version bytes over the years, but this breaks backwards compatibility, and I don't think this viable since we're trying to be stable now :) Another example is litecoins SCRIPTHASH2 version byte - we can't change the version here without upsetting people who depend on it being the old way.
I think a better way for dealing with networks is something like @dan-da's coinparams project, which implements NetworkInterface and has a massive set of network configurations available.
If you were using these to-be-removed network objects, just copy them (& and the tests!) into your code base.
If you need to write a new network, write a new class extending Network, and fill in the required properties! You can grab these from your coins chainparams.cpp (if it's a new enough fork of bitcoin), or else they'll be scattered around the codebase (if it's a really ancient fork)