Change the internal storage format from 5-bits/byte (Bech32 intermediate format)
to standard 8-bits/byte.
Remove now unneeded conversions and add conversion in toBech32().
Separate witnessVersion from witnessProgram in private members.
Note that the witnessProgram is still stored in a 5-bit per byte encoding
as it was in the combined byte[]. A future PR will change it to 8-bit per
byte encoding.
* Change the private compareP2SHScriptHashDerivedFromPubKey() method to
take a LegacyAddress
* In caller cast address (after check for P2SH) to LegacyAddress
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.