From 0e1e7a4d126d2939bc22b5a8ba838116a650a9e0 Mon Sep 17 00:00:00 2001 From: Djuri Baars Date: Wed, 20 Sep 2023 02:02:47 +0200 Subject: [PATCH] Added check for using own node --- src/tasks/blocknotify.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tasks/blocknotify.cpp b/src/tasks/blocknotify.cpp index ea1ea6c..f2427fb 100644 --- a/src/tasks/blocknotify.cpp +++ b/src/tasks/blocknotify.cpp @@ -21,7 +21,7 @@ void checkBitcoinBlock(void *pvParameters) HTTPClient http; http.setReuse(true); - useBitcoind = wifiClientInsecure.connect(preferences.getString("rpcHost", BITCOIND_HOST).c_str(), preferences.getUInt("rpcPort", BITCOIND_PORT)); + useBitcoind = preferences.getBool("useNode", false) && wifiClientInsecure.connect(preferences.getString("rpcHost", BITCOIND_HOST).c_str(), preferences.getUInt("rpcPort", BITCOIND_PORT)); if (useBitcoind) Serial.println("bitcoind node is reachable, using this for blocks."); else