Added check for using own node

This commit is contained in:
Djuri Baars 2023-09-20 02:02:47 +02:00
parent e533f87d08
commit 0e1e7a4d12

View File

@ -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