cormorant: improve error message when core wallet support is disabled

This commit is contained in:
Craig Raw 2023-04-14 07:50:06 -06:00
parent c7ab8e4601
commit 432e0642ca

View file

@ -125,6 +125,9 @@ public class BitcoindClient {
}
ListWalletDirResult listWalletDirResult = getBitcoindService().listWalletDir();
if(listWalletDirResult == null) {
throw new RuntimeException("Wallet support must be enabled in Bitcoin Core");
}
boolean exists = listWalletDirResult.wallets().stream().anyMatch(walletDirResult -> walletDirResult.name().equals(CORE_WALLET_NAME));
legacyWalletExists = listWalletDirResult.wallets().stream().anyMatch(walletDirResult -> walletDirResult.name().equals(Bwt.DEFAULT_CORE_WALLET));