daemon version check, idle mining control, bootstrap mirror, import key paste, and cleanup
- Add startup binary version checking for dragonxd/xmrig - Display daemon version in UI - Add idle mining thread count adjustment - Add bootstrap mirror option (bootstrap2.dragonx.is) in setup wizard - Add paste button to import private key dialog with address validation - Add z-address generation UI feedback (loading indicator) - Add option to delete blockchain data while preserving wallet.dat - Add font scale slider hotkey tooltip (Ctrl+Plus/Ctrl+Minus) - Fix Windows RPC auth: trim \r from config values, add .cookie fallback - Fix connection status message during block index loading - Improve application shutdown to prevent lingering background process
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
// Released under the GPLv3
|
||||
|
||||
#include "bootstrap.h"
|
||||
#include "../daemon/embedded_daemon.h"
|
||||
|
||||
#include <curl/curl.h>
|
||||
#include <miniz.h>
|
||||
@@ -135,11 +136,33 @@ void Bootstrap::start(const std::string& dataDir, const std::string& url) {
|
||||
worker_running_ = false;
|
||||
return;
|
||||
}
|
||||
// Step 3: Clean old chain data
|
||||
// Step 3: Ensure daemon is fully stopped before touching chain data
|
||||
{
|
||||
setProgress(State::Extracting, "Waiting for daemon to stop...");
|
||||
int waited = 0;
|
||||
while (daemon::EmbeddedDaemon::isRpcPortInUse() && waited < 60 && !cancel_requested_) {
|
||||
std::this_thread::sleep_for(std::chrono::seconds(1));
|
||||
waited++;
|
||||
if (waited % 5 == 0)
|
||||
DEBUG_LOGF("[Bootstrap] Still waiting for daemon to stop... (%ds)\n", waited);
|
||||
}
|
||||
if (cancel_requested_) {
|
||||
setProgress(State::Failed, "Cancelled while waiting for daemon");
|
||||
worker_running_ = false;
|
||||
return;
|
||||
}
|
||||
if (daemon::EmbeddedDaemon::isRpcPortInUse()) {
|
||||
setProgress(State::Failed, "Daemon is still running — stop it before using bootstrap");
|
||||
worker_running_ = false;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// Step 4: Clean old chain data
|
||||
setProgress(State::Extracting, "Removing old chain data...");
|
||||
cleanChainData(dataDir);
|
||||
|
||||
// Step 4: Extract (skipping wallet.dat)
|
||||
// Step 5: Extract (skipping wallet.dat)
|
||||
if (!extract(zipPath, dataDir)) {
|
||||
if (cancel_requested_)
|
||||
setProgress(State::Failed, "Extraction cancelled");
|
||||
|
||||
Reference in New Issue
Block a user