Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid startup failure when bannedSeedNodes arg is empty
This commit fixes bisq-network#4103, where it was demonstrated that a bisq.properties file containing the following entries would cause Bisq to fail at startup: baseCurrencyNetwork=BTC_MAINNET bannedSeedNodes= bannedBtcNodes= bannedPriceRelayNodes=5bmpx76qllutpcyp The source of the problem was that the jOptSimple argument parsing library converts the empty value of bannedSeedNodes to a List<String> of size 1 where the 0th element of the list is an empty string. This empty string was then attempted to be converted into a new NodeAddress, causing a validation error. This conversion happened during Guice wiring, and manifested as a blank white screen appearing as wiring errors often do in Bisq. The fix is simple and surgical. We now filter out any empty string elements before attempting to convert the banned seed node value to a new node address. I have reviewed the other related options, such as bannedPriceRelayNodes and bannedBtcNodes, and they do not cause the problem described above, so no filtering or other changes have been made to the way they work.
- Loading branch information