From fcee06a5c3ee50b3972655905f01dd7039542c91 Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Sat, 13 Nov 2021 13:34:48 -0500 Subject: [PATCH] Fix autostart of hushd Since hushd is no longer a script but a real binary, our code to autostart hushd no longer has any arguments. But QT gets angry with an empty list of arguments, because it splits arguments into an array on space characters. So this bug ended up tring to start hush via ./hushd "" instead of ./hushd, which creates an "Ooops" error from hushd, which thinks you are trying to use hush-cli. Now we provide two arguments, with default values, that allows the rest of the code to work correctly. --- src/connection.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/connection.cpp b/src/connection.cpp index 7d953d2..701b491 100644 --- a/src/connection.cpp +++ b/src/connection.cpp @@ -359,6 +359,7 @@ bool ConnectionLoader::startEmbeddedHushd() { main->logger->write("Can't find hushd at " + hushdProgram); return false; } else { + qDebug() << "Found hushd at " << hushdProgram; main->logger->write("Found hushd at " + hushdProgram); } @@ -373,7 +374,8 @@ bool ConnectionLoader::startEmbeddedHushd() { }); QObject::connect(ehushd.get(), &QProcess::errorOccurred, [&] (QProcess::ProcessError error) { - qDebug() << "Couldn't start hushd at " << hushdProgram << ":" << error; + qDebug() << "Couldn't start hushd!"; + qDebug() << "hushd at " << hushdProgram << ":" << error; }); std::weak_ptr weak_obj(ehushd); @@ -386,7 +388,7 @@ bool ConnectionLoader::startEmbeddedHushd() { // This string should be the exact arg list seperated by single spaces // Could be modified to start different Hush Smart Chains - QString params = ""; // "-ac_name=TUSH"; + QString params = "-tls=only -clientname=GoldenSandtrout"; // "-ac_name=TUSH"; /* This is now enabled by default in hushd // Binaries come with this file