mirror of
https://github.com/bisq-network/bisq.git
synced 2024-11-19 09:52:23 +01:00
Detect if DAO full node has no BTC core running
If DAO full mode is used Bitcoin core need to be running. If not an RPC exception is thrown. We detect that and show a popup with instructions.
This commit is contained in:
parent
7c2d10066f
commit
42e0d410d2
@ -31,6 +31,8 @@ import bisq.network.p2p.P2PService;
|
||||
import bisq.common.UserThread;
|
||||
import bisq.common.handlers.ResultHandler;
|
||||
|
||||
import com.neemre.btcdcli4j.core.http.HttpLayerException;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
||||
import java.util.function.Consumer;
|
||||
@ -244,8 +246,16 @@ public class FullNode extends BsqNode {
|
||||
String errorMessage = "An error occurred: Error=" + throwable.toString();
|
||||
log.error(errorMessage);
|
||||
|
||||
if (throwable instanceof BlockNotConnectingException)
|
||||
if (throwable instanceof BlockNotConnectingException) {
|
||||
startReOrgFromLastSnapshot();
|
||||
} else if (throwable instanceof RpcException &&
|
||||
throwable.getCause() != null &&
|
||||
throwable.getCause() instanceof HttpLayerException &&
|
||||
((HttpLayerException) throwable.getCause()).getCode() == 1004004) {
|
||||
errorMessage = "You have configured Bisq to run as DAO full node but there is not " +
|
||||
"localhost Bitcoin Core node detected. You need to have Bitcoin Core started and synced before " +
|
||||
"starting Bisq.";
|
||||
}
|
||||
|
||||
if (errorMessageHandler != null)
|
||||
errorMessageHandler.handleErrorMessage(errorMessage);
|
||||
|
Loading…
Reference in New Issue
Block a user