fix: large-wallet sync starvation + shutdown/console-flash UX (Windows full node) #2
@@ -689,7 +689,10 @@ bool EmbeddedDaemon::startProcess(const std::string& binary_path, const std::vec
|
|||||||
debug_log_path_.c_str(), debug_log_offset_);
|
debug_log_path_.c_str(), debug_log_offset_);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Launch daemon with CREATE_NEW_CONSOLE (hidden via SW_HIDE).
|
// Launch daemon windowless. Use CREATE_NO_WINDOW (NOT CREATE_NEW_CONSOLE): CREATE_NEW_CONSOLE
|
||||||
|
// allocates a console window that briefly flashes on screen before SW_HIDE can hide it, which is
|
||||||
|
// visible as a console-window flash on wallet launch. CREATE_NO_WINDOW gives the console child no
|
||||||
|
// window at all (same approach as the xmrig launcher). The daemon logs to debug.log, not a console.
|
||||||
// The daemon binary must NOT be in the data directory (%APPDATA%\Hush\DRAGONX)
|
// The daemon binary must NOT be in the data directory (%APPDATA%\Hush\DRAGONX)
|
||||||
// — it must be in <exe_dir>/dragonx/ to avoid conflicts with lock files and data.
|
// — it must be in <exe_dir>/dragonx/ to avoid conflicts with lock files and data.
|
||||||
STARTUPINFOA si;
|
STARTUPINFOA si;
|
||||||
@@ -699,7 +702,7 @@ bool EmbeddedDaemon::startProcess(const std::string& binary_path, const std::vec
|
|||||||
si.dwFlags = STARTF_USESHOWWINDOW;
|
si.dwFlags = STARTF_USESHOWWINDOW;
|
||||||
si.wShowWindow = SW_HIDE;
|
si.wShowWindow = SW_HIDE;
|
||||||
ZeroMemory(&pi, sizeof(pi));
|
ZeroMemory(&pi, sizeof(pi));
|
||||||
|
|
||||||
char* cmd_line = _strdup(cmd.c_str());
|
char* cmd_line = _strdup(cmd.c_str());
|
||||||
BOOL success = CreateProcessA(
|
BOOL success = CreateProcessA(
|
||||||
NULL,
|
NULL,
|
||||||
@@ -707,7 +710,7 @@ bool EmbeddedDaemon::startProcess(const std::string& binary_path, const std::vec
|
|||||||
NULL,
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
FALSE,
|
FALSE,
|
||||||
CREATE_NEW_CONSOLE,
|
CREATE_NO_WINDOW,
|
||||||
NULL,
|
NULL,
|
||||||
work_dir.c_str(),
|
work_dir.c_str(),
|
||||||
&si,
|
&si,
|
||||||
|
|||||||
Reference in New Issue
Block a user