From 3268ba8619b7757af8eb440a192493c35841f906 Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Tue, 26 Oct 2021 17:42:08 -0400 Subject: [PATCH] It is a hush conf --- src/connection.cpp | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/src/connection.cpp b/src/connection.cpp index d97b94b..1b7869b 100644 --- a/src/connection.cpp +++ b/src/connection.cpp @@ -679,12 +679,12 @@ std::shared_ptr ConnectionLoader::autoDetectHushConf() { QTextStream in(&file); - auto zcashconf = new ConnectionConfig(); - zcashconf->host = "127.0.0.1"; - zcashconf->connType = ConnectionType::DetectedConfExternalHushD; - zcashconf->usingHushConf = true; - zcashconf->zcashDir = QFileInfo(confLocation).absoluteDir().absolutePath(); - zcashconf->hushDaemon = false; + auto hushconf = new ConnectionConfig(); + hushconf->host = "127.0.0.1"; + hushconf->connType = ConnectionType::DetectedConfExternalHushD; + hushconf->usingHushConf = true; + hushconf->zcashDir = QFileInfo(confLocation).absoluteDir().absolutePath(); + hushconf->hushDaemon = false; Settings::getInstance()->setUsingHushConf(confLocation); @@ -695,43 +695,43 @@ std::shared_ptr ConnectionLoader::autoDetectHushConf() { QString value = line.right(line.length() - s - 1).trimmed(); if (name == "rpcuser") { - zcashconf->rpcuser = value; + hushconf->rpcuser = value; } if (name == "rpcpassword") { - zcashconf->rpcpassword = value; + hushconf->rpcpassword = value; } if (name == "rpcport") { - zcashconf->port = value; + hushconf->port = value; } if (name == "daemon" && value == "1") { - zcashconf->hushDaemon = true; + hushconf->hushDaemon = true; } if (name == "proxy") { - zcashconf->proxy = value; + hushconf->proxy = value; } if (name == "consolidation") { - zcashconf->consolidation = value; + hushconf->consolidation = value; } if (name == "deletetx") { - zcashconf->deletetx = value; + hushconf->deletetx = value; } if (name == "zindex") { - zcashconf->zindex = value; + hushconf->zindex = value; } if (name == "testnet" && value == "1" && - zcashconf->port.isEmpty()) { - zcashconf->port = "18232"; + hushconf->port.isEmpty()) { + hushconf->port = "18232"; } } // If rpcport is not in the file, and it was not set by the testnet=1 flag, then go to default - if (zcashconf->port.isEmpty()) zcashconf->port = "18031"; + if (hushconf->port.isEmpty()) hushconf->port = "18031"; file.close(); // In addition to the HUSH3/HUSH3.conf file, also double check the params. - return std::shared_ptr(zcashconf); + return std::shared_ptr(hushconf); } /**