diff --git a/src/app.cpp b/src/app.cpp index ac2acc4..a4ae24d 100644 --- a/src/app.cpp +++ b/src/app.cpp @@ -4298,7 +4298,7 @@ void App::maybeOfferDaemonUpdate() { if (!supportsFullNodeLifecycleActions()) return; // lite / no embedded-daemon build if (capture_mode_ || !settings_) return; // never during a UI sweep - auto inst = resources::getInstalledDaemonInfo(); + auto inst = resources::getInstalledDaemonInfo(/*scanVersion=*/false); // only exists/size are used here auto bun = resources::getBundledDaemonInfo(); // Only when a daemon is ALREADY installed and its size differs from the bundled one — an absent // daemon is extracted normally, and a same-size match needs nothing. Fire once per bundled diff --git a/src/resources/embedded_resources.cpp b/src/resources/embedded_resources.cpp index e144eb9..3742f1c 100644 --- a/src/resources/embedded_resources.cpp +++ b/src/resources/embedded_resources.cpp @@ -663,7 +663,7 @@ static std::string scanBinaryVersion(const uint8_t* data, std::size_t size) return ""; } -DaemonBinaryInfo getInstalledDaemonInfo() +DaemonBinaryInfo getInstalledDaemonInfo(bool scanVersion) { DaemonBinaryInfo info; std::string daemonDir = getDaemonDirectory(); @@ -688,6 +688,7 @@ DaemonBinaryInfo getInstalledDaemonInfo() } // Read the binary and scan for its version stamp (one-off; caller caches the result). + if (!scanVersion) return info; std::ifstream f(info.path, std::ios::binary); if (f) { f.seekg(0, std::ios::end); diff --git a/src/resources/embedded_resources.h b/src/resources/embedded_resources.h index ae8f0a7..38c5a7e 100644 --- a/src/resources/embedded_resources.h +++ b/src/resources/embedded_resources.h @@ -48,7 +48,8 @@ struct BundledDaemonInfo { }; // Read + scan the installed dragonxd (reads the file; call off the UI thread or cache the result). -DaemonBinaryInfo getInstalledDaemonInfo(); +// scanVersion=false: stat only (exists / size / modifiedEpoch), no 16 MB read. +DaemonBinaryInfo getInstalledDaemonInfo(bool scanVersion = true); // Info about the bundled daemon (scans the embedded bytes once, cached). BundledDaemonInfo getBundledDaemonInfo(); // Force-overwrite the installed dragonx binaries (dragonxd/cli/tx) with the bundled ones. The