add error message when connecting to bitcoin core with a taproot wallet

This commit is contained in:
Craig Raw
2022-11-08 10:36:56 +02:00
parent 871c503bc9
commit a25b53bd44
2 changed files with 7 additions and 0 deletions
@@ -1105,6 +1105,8 @@ public class ElectrumServer {
Matcher walletLoadingMatcher = RPC_WALLET_LOADING_PATTERN.matcher(bwtStartException.getMessage());
if(bwtStartException.getMessage().contains("Wallet file not specified")) {
throw new ServerException("Bitcoin Core requires Multi-Wallet to be enabled in the Server Preferences");
} else if(bwtStartException.getMessage().contains("Taproot wallets are not supported")) {
throw new ServerException(bwtStartException.getMessage());
} else if(walletLoadingMatcher.matches() && walletLoadingMatcher.group(1) != null) {
throw new ServerException(walletLoadingMatcher.group(1));
}