Rename hush→dragonx across wallet codebase

- Rename RESOURCE_HUSHD/HUSH_CLI/HUSH_TX to RESOURCE_DRAGONXD/DRAGONX_CLI/DRAGONX_TX
- Remove unused .bat resource constants (DRAGONXD_BAT, DRAGONX_CLI_BAT)
- Update INCBIN symbols: g_hushd_exe → g_dragonxd_exe, etc.
- Update daemon search paths, removing hush-arrakis-chain fallbacks
- Update process detection (Windows findProcessByName, Linux /proc/comm, macOS pgrep)
- Update build.sh: embed dragonxd.exe/dragonx-cli.exe/dragonx-tx.exe
- Overhaul setup.sh: fix binary names, release paths, add -j passthrough
- Update getDaemonPath/needsDaemonExtraction/hasDaemonAvailable for new names
This commit is contained in:
dan_s
2026-03-04 03:17:32 -06:00
parent 386cc857b0
commit 7fb1f1de9d
16 changed files with 416 additions and 195 deletions

View File

@@ -486,7 +486,7 @@ double Platform::getSelfMemoryUsageMB()
double Platform::getDaemonMemoryUsageMB()
{
#ifdef _WIN32
// Windows: use CreateToolhelp32Snapshot to find hushd.exe processes
// Windows: use CreateToolhelp32Snapshot to find dragonxd.exe processes
// and query their working set size.
HANDLE snap = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);
if (snap == INVALID_HANDLE_VALUE) return 0.0;
@@ -497,7 +497,7 @@ double Platform::getDaemonMemoryUsageMB()
double totalMB = 0.0;
if (Process32First(snap, &entry)) {
do {
if (_stricmp(entry.szExeFile, "hushd.exe") == 0) {
if (_stricmp(entry.szExeFile, "dragonxd.exe") == 0) {
// GetProcessMemoryInfo requires PROCESS_QUERY_INFORMATION + PROCESS_VM_READ.
// Try full access first; fall back to limited for elevated processes.
HANDLE hProc = OpenProcess(
@@ -522,8 +522,8 @@ double Platform::getDaemonMemoryUsageMB()
CloseHandle(snap);
return totalMB;
#elif defined(__APPLE__)
// macOS: use pgrep to find hushd PIDs, then read RSS via proc_pidinfo
FILE* fp = popen("pgrep -x hushd", "r");
// macOS: use pgrep to find dragonxd PIDs, then read RSS via proc_pidinfo
FILE* fp = popen("pgrep -x dragonxd", "r");
if (!fp) return 0.0;
double totalMB = 0.0;
char line[64];
@@ -548,7 +548,7 @@ double Platform::getDaemonMemoryUsageMB()
pclose(fp);
return totalMB;
#else
// Linux: iterate /proc/<pid>/comm looking for "hushd"
// Linux: iterate /proc/<pid>/comm looking for "dragonxd"
DIR* procDir = opendir("/proc");
if (!procDir) return 0.0;
double totalMB = 0.0;
@@ -573,7 +573,7 @@ double Platform::getDaemonMemoryUsageMB()
}
fclose(cf);
if (strcmp(comm, "hushd") != 0) continue;
if (strcmp(comm, "dragonxd") != 0) continue;
// Read VmRSS from /proc/<pid>/status
char statusPath[64];

View File

@@ -118,8 +118,8 @@ public:
static double getSelfMemoryUsageMB();
/**
* @brief Get total RSS of all hushd daemon processes in megabytes
* Scans for any running hushd process by name, regardless of how it was launched.
* @brief Get total RSS of all dragonxd daemon processes in megabytes
* Scans for any running dragonxd process by name, regardless of how it was launched.
* @return Combined daemon RSS in MB, or 0 if no daemon found
*/
static double getDaemonMemoryUsageMB();