- Use AtomicBoolean vs. SimpleBooleanProperty in TomP2PTests to avoid
use of javax.* classes where they aren't otherwise necessary.
- Reformat code globally to eliminate trailing whitespace and fix
indentation
- Optimize imports globally to eliminate unused imports
- Convert static fields to final instance fields
- Remove commented code
- Rethrow any AddressFormatException as a BitsquareException instead of
logging and returning null (doing so would cause NPEs in BitcoinJ
internals).
BitcoinNetwork now supports a #getParameters method that returns the
BitcoinJ NetworkParameters instance associated with the given
BitcoinNetwork enum label (e.g. TESTNET.getParameters() returns
TestNet3Params, etc).
BitcoinModule#BITCOIN_NETWORK_KEY and #DEFAULT_BITCOIN_NETWORK have been
moved to BitcoinNetwork#KEY and BitcoinNetwork#DEFAULT respectively.
Customzing the bitcoin network to use on the command line has been
improved. Values may be upper or lower case (e.g. "testnet", "TESTNET"),
and the value passed is converted to the correct BitcoinNetwork enum
value with the new EnumValueConverter class.
Finally, a BitcoinNetwork instance is now made available for injection
by BitcoinModule as opposed to binding a NetworkParameters instance. All
injection targets (constructors) throughout the codebase have been
updated to reflect this change, and the result is cleaner, enum-based
processing everywhere possible. And where it's necessary to drop down to
BitcoinJ's NetworkParameters, that's easy to do by calling
BitcoinNetwork#getParameters.
This is essentially the default IDEA formatting settings, with one tweak
made to allow same-line field annotations (useful particularly in the
case of the @FXML annotation)