This updates the document to have 4 diagrams, one for each of the
following releases:
1. 0.16.x (current stable release)
2. 0.17 (according to current plans)
3. 0.18 (according to current plans)
4. 0.19 (this more of a proposal than a plan at this point)
The diagrams have also been enhanced to differentiate between packages
and modules (aka JARs) and to distinguish between "api" and "implementation"
dependencies.
Hopefully this makes things much more clear. We can make further changes
as our plans and implementations change.
1. Returns Duration rather than long
2. Uses CompletableFuture rather than ListenableCompletableFuture
I've also changed the error-handling a little. Instead of throwing
a ProtocolException (RuntimeException) if PingPong isn't supported
the exception is set in the CompletableFuture. We don't have anything
catching this exception, so wrapping it in the CompletableFuture seems
like a safe move.
* Deprecate ByteUtils.HEX
* Migrate usages to new ByteUtils.formatHex() and ByteUtils.parseHex()
* Direct use of Guava BaseEncoding in tests that use some specific
features of BaseEncoding that aren't provided by new methods.
There's no convenient Java built-in for exponentiation
of `long`. And the COIN_VALUE constant is unlikely to ever change.
So we're just going to define it with a `long` literal.
Fortunately Java 7 added the ability to use `_` to group digits.
As we're migrating from ListenableCompletableFuture to standard
CompletableFuture, we need a failedFuture() method that returns the
standard CompletableFuture object.
TransactionBroadcast already needed this method as it was returning
a ListenableCompletableFuture in one case where a standard
CompletableFuture would be preferred.
This method can be deprecated when we require Java 9.
Finish conversion from NetworkParameters to Network in the tests. This cleans up
the code, too.
There are still some references to NetworkParameters in LegacyAddressTest:
1. Tests of deprecated methods that can be removed when those methods are removed
2. Tests that need getP2SHHeader() which hasn't moved to Network yet.
* Replace all usages of *Net*Params.get() with BitcoinNetwork.* enum
* Where NetworkParameters is needed get it with NetworkParameters.of(network)
This change does the following:
* Makes it clear that BitcoinNetwork.* is the preferred method of specifying/declaring
the active network.
* Prepares the way for examples to get the network string as a command-line arg
* Continues the general migration from NetworkParameters to Network
* Add 3 new constructors which take Network
* Deprecate (2 of 3) constructors that take NetworkParameters
* Mark 3-arg NetworkParameters constructor as @VisibleForTesting