Chris Beams
e67746b0a4
Remove TestConfig in favor of reworked Config ctors
2020-01-20 16:46:57 +01:00
Chris Beams
b5503a5aa4
Replace HelpRequested exception with Config.isHelpRequested()
2020-01-20 16:46:57 +01:00
Chris Beams
3f605f873f
Remove now unused BisqExecutable option handling
...
Option handling is now the responsibility of the Config class. JOpt's
OptionParser is no longer passed down to BisqExecutable subclasses'
doExecute method, as they can now rely on the Config abstraction.
2020-01-20 16:46:56 +01:00
Chris Beams
7382344618
Catch ConfigException as contingency, Throwble as fault
...
Previously the code under bisq.common.config threw a mix of
ConfigException and IllegalArgumentException. It now throws
ConfigException consistently such that it may be caught and dealt with
as an anticipated contingency, and such that any other Throwable may be
caught and dealt with as a fault, i.e. an unexpected error that probably
represents a bug in the code.
The https://bisq.network/issues link presented to the user when a fault
occurs is a redirect added to the website by PR
https://github.com/bisq-network/bisq-website/pull/316 .
For background on contingency vs. fault nomenclature, see:
https://www.oracle.com/technical-resources/articles/enterprise-architecture/effective-exceptions-part3.html
2020-01-20 16:46:56 +01:00
Chris Beams
6d6d41b329
Broaden BisqExcutable exception handling
...
Previously, certain exceptions e.g. IllegalArgumentException would
result in the Bisq process exiting with an stack trace. This change
broadens exception handling during argument parsing such that all
Throwable subclasses are caught and the Bisq process exits gracefully
with a simple error message.
2020-01-20 16:46:56 +01:00
Chris Beams
2c7829948b
Replace uses of Spring CollectionUtils
...
See Javadoc in new bisq.common.util.CollectionUtils class.
2020-01-20 16:41:19 +01:00
Chris Beams
f5a1854762
Remove now unused BisqEnvironment class
...
In previous commits, BisqEnvironment functionality has been fully ported
to the new, simpler and more type-safe Config class. This change removes
BisqEnvironment and all dependencies on the Spring Framework Environment
interface that it implements.
The one exception is the pricenode module, which is separate and apart
from the rest of the codebase in that it is a standalone, Spring-based
HTTP service.
2020-01-20 16:41:19 +01:00
Chris Beams
1216ba2e2c
Finish moving 'referralId' option handling to Config
2020-01-20 16:40:32 +01:00
Chris Beams
c6d042568a
Finish moving 'useDevMode' option handling to Config
2020-01-20 16:40:32 +01:00
Chris Beams
9ff6dd2c82
Finish moving 'useDevPrivilegeKeys' option handling to Config
2020-01-20 16:40:32 +01:00
Chris Beams
43fb851514
Remove now unused DaoOptionKeys class
2020-01-20 16:40:32 +01:00
Chris Beams
15c492b5b4
Finish moving 'daoActivated' option handling to Config
2020-01-20 16:40:31 +01:00
Chris Beams
aadf7c76aa
Move 'genesisTotalSupply' option handling to Config
2020-01-20 16:40:31 +01:00
Chris Beams
ca5b260806
Move 'genesisBlockHeight' option handling to Config
2020-01-20 16:40:31 +01:00
Chris Beams
6ea146444f
Move 'genesisTxId' option handling to Config
2020-01-20 16:40:31 +01:00
Chris Beams
519259b752
Move 'fullDaoNode' option handling to Config
2020-01-20 16:40:31 +01:00
Chris Beams
2995bc27bd
Move 'dumpBlockchainData' option handling to Config
2020-01-20 16:40:31 +01:00
Chris Beams
9a7eedb250
Move 'rpcBlockNotificationHost' option handling to Config
2020-01-20 16:40:30 +01:00
Chris Beams
3841e6b1dd
Move 'rpcBlockNotificationPort' option handling to Config
2020-01-20 16:40:30 +01:00
Chris Beams
86e1ae1008
Move 'rpcPort' option handling to Config
2020-01-20 16:40:30 +01:00
Chris Beams
182f472394
Move 'rpcHost' option handling to Config
2020-01-20 16:40:30 +01:00
Chris Beams
b4d4ca4fbe
Move 'rpcPassword' option handling to Config
2020-01-20 16:40:30 +01:00
Chris Beams
80754ed3d5
Move 'rpcUser' option handling to Config
2020-01-20 16:40:30 +01:00
Chris Beams
919c58eefe
Remove now unused BtcOptionKeys class
...
Includes cleaning up a couple unrelated unused imports in
P2PNetworkLoad.
2020-01-20 16:40:29 +01:00
Chris Beams
99cf8c9596
Move 'numConnectionsForBtc' option handling to Config
...
Note that this change makes the user-facing change of renaming
the 'numConnectionForBtc' (singular 'Connection') to
'numConnectionsForBtc' (plural 'Connections'). It is presumed that not
many users are relying on this option for day-to-day operations, and the
singular version was pretty clearly a typo / oversight.
2020-01-20 16:40:29 +01:00
Chris Beams
c8d739ded5
Move 'userAgent' option handling to Config
2020-01-20 16:39:36 +01:00
Chris Beams
97cafaf61e
Move 'useAllProvidedNodes' option handling to Config
2020-01-20 16:39:35 +01:00
Chris Beams
b7889dd994
Move 'socks5DiscoverMode' option handling to Config
2020-01-20 16:39:35 +01:00
Chris Beams
90031543b9
Move 'useTorForBtc' option handling to Config
2020-01-20 16:39:35 +01:00
Chris Beams
5271d4d574
Move 'btcNodes' option handling to Config
2020-01-20 16:39:35 +01:00
Chris Beams
4fb60a33ac
Finish moving 'ignoreLocalBtcNode' option handling to Config
2020-01-20 16:39:35 +01:00
Chris Beams
769c62b7b3
Finish moving 'bitcoinRegtestHost' option handling to Config
2020-01-20 16:39:34 +01:00
Chris Beams
326375e4e4
Remove now unused NetworkOptionKeys class
2020-01-20 16:39:34 +01:00
Chris Beams
8e4107d80a
Remove obsolete NETWORK_ID option key
...
NETWORK_ID has not been in use since commit de93a6fa1
, except by
the DummySeedNode test class, where its use has been preserved as string
literals.
2020-01-20 16:39:34 +01:00
Chris Beams
2dbd72b358
Move message throttle option handling to Config
2020-01-20 16:39:34 +01:00
Chris Beams
ca3719a139
Move 'torStreamIsolation' option handling to Config
2020-01-20 16:39:33 +01:00
Chris Beams
25604c1b29
Move 'torControlUseSafeCookieAuth' option handling to Config
2020-01-20 16:39:33 +01:00
Chris Beams
e90b2566a9
Move 'torControlCookieFile' option handling to Config
2020-01-20 16:39:33 +01:00
Chris Beams
5966d0ddcb
Move 'torControlPassword' option handling to Config
2020-01-20 16:39:33 +01:00
Chris Beams
d25ad0d266
Move 'torControlPort' option handling to Config
...
Note the introduction of Config.NULL_INT to avoid needing to inject
nullable boxed Integers in cases like this.
2020-01-20 16:39:33 +01:00
Chris Beams
923ec69966
Move 'torrcOptions' option handling to Config
2020-01-20 16:39:33 +01:00
Chris Beams
fea3a641c0
Move 'torrcFile' option handling to Config
2020-01-20 16:39:33 +01:00
Chris Beams
5a0683e984
Move 'socks5ProxyHttpAddress' option handling to Config
2020-01-20 16:39:32 +01:00
Chris Beams
5c02b12043
Move 'socks5ProxyBtcAddress' option handling to Config
2020-01-20 16:39:32 +01:00
Chris Beams
8d6dbad484
Move 'maxConnections' option handling to Config
2020-01-20 16:39:32 +01:00
Chris Beams
0e48a3ef2c
Move 'useLocalhostForP2P' option handling to Config
2020-01-20 16:39:32 +01:00
Chris Beams
ef7196ef8a
Finish moving 'nodePort' option handling to Config
2020-01-20 16:39:32 +01:00
Chris Beams
c56c06d939
Move 'banList' option handling to Config
2020-01-20 16:39:32 +01:00
Chris Beams
e118165e9a
Move 'seedNode' option handling to Config
...
And eliminate @Named injection in favor of calling config.getSeedNodes()
2020-01-20 16:39:31 +01:00
Chris Beams
7be2ff19f8
Remove now unused CommonOptionKeys class
2020-01-20 16:39:31 +01:00