[bisq-network/bisq] Changing BTC network does not have any effect (#2048)

Florian Reimair notifications at github.com
Tue Dec 4 15:52:26 UTC 2018


I have been able to track the issue down to 83e1dd37f975a97c56c8aa5337fda29a4b10a063. (and probably the issue, where the appdir uses the default dir as well).

### The issue

https://github.com/bisq-network/bisq/blob/83e1dd37f975a97c56c8aa5337fda29a4b10a063/core/src/main/java/bisq/core/app/BisqExecutable.java#L478-L482 introduces a default value which is used by the options parser if required (i.e. whenever you do not add ```--baseCurrencyNetwork=BTC_TESTNET```)

However, due to https://github.com/bisq-network/bisq/blob/83e1dd37f975a97c56c8aa5337fda29a4b10a063/core/src/main/java/bisq/core/app/BisqEnvironment.java#L338-L340
Bisq first parses the ```commandLineProperties``` (which already provides the default values due to the abovementioned changes), and thus, the  getProperty-call is satisfied already and the ```getAppDirProperties()``` are never asked.

This all boils down to a mostly useless ```bisq.properties``` at the moment.

### Fix
Now, it is not trivial to change the behaviour while keeping the (most welcome) changes of 83e1dd37f975a97c56c8aa5337fda29a4b10a063.
- if we change the order of the property sources, we foreclose overriding bisq.properties-properties with cmdline options
- if we partially revert 83e1dd37f975a97c56c8aa5337fda29a4b10a063, we create a permanent minefield for future developments
- we could use ```bisq.properties``` as defaults where applicable. However, we would have to open the ```BisqEnvironment``` to ```BisqExecutable```
- ???

all in all, I do not want to decide on that alone: @cbeams, @ManfredKarrer any ideas?

### other
- does 83e1dd37f975a97c56c8aa5337fda29a4b10a063 deprecate things? for example https://github.com/bisq-network/bisq/blob/83e1dd37f975a97c56c8aa5337fda29a4b10a063/core/src/main/java/bisq/core/app/BisqEnvironment.java#L207-L335
and 
https://github.com/bisq-network/bisq/blob/83e1dd37f975a97c56c8aa5337fda29a4b10a063/core/src/main/java/bisq/core/app/BisqEnvironment.java#L445-L502
which might cleanup the minefield a bit
- for the appdir issue #2019 https://github.com/bisq-network/bisq/blob/83e1dd37f975a97c56c8aa5337fda29a4b10a063/core/src/main/java/bisq/core/app/BisqExecutable.java#L425-L428 might to be responsible.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/bisq-network/bisq/issues/2048#issuecomment-444149682
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20181204/d1bc79ae/attachment.html>


More information about the bisq-github mailing list