Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ MAINNET_core_rpc_password=password
MAINNET_insight_api_url=https://insight.dash.org/insight-api
MAINNET_core_zmq_endpoint=tcp://127.0.0.1:23708
MAINNET_show_in_ui=true
MAINNET_developer_mode=true

TESTNET_dapi_addresses=https://34.214.48.68:1443,https://52.12.176.90:1443,https://52.34.144.50:1443,https://44.240.98.102:1443,https://54.201.32.131:1443,https://52.10.229.11:1443,https://52.13.132.146:1443,https://52.40.219.41:1443,https://54.149.33.167:1443,https://35.164.23.245:1443,https://52.33.28.47:1443,https://52.43.13.92:1443,https://52.89.154.48:1443,https://52.24.124.162:1443,https://35.85.21.179:1443,https://54.187.14.232:1443,https://54.68.235.201:1443,https://52.13.250.182:1443
TESTNET_core_host=127.0.0.1
Expand All @@ -20,7 +19,6 @@ TESTNET_core_rpc_password=password
TESTNET_insight_api_url=https://testnet-insight.dash.org/insight-api
TESTNET_core_zmq_endpoint=tcp://127.0.0.1:23709
TESTNET_show_in_ui=true
TESTNET_developer_mode=false

DEVNET_dapi_addresses=http://54.203.116.91:1443,http://52.88.16.46:1443,http://34.222.214.170:1443,http://54.214.77.108:1443,http://52.40.186.234:1443,http://54.202.231.20:1443,http://35.89.246.86:1443,http://18.246.227.21:1443,http://44.245.96.164:1443,http://44.247.160.52:1443
DEVNET_core_host=127.0.0.1
Expand All @@ -30,7 +28,6 @@ DEVNET_core_rpc_password=password
DEVNET_insight_api_url=
DEVNET_core_zmq_endpoint=tcp://127.0.0.1:23710
DEVNET_show_in_ui=true
DEVNET_developer_mode=false

LOCAL_dapi_addresses=http://127.0.0.1:2443,http://127.0.0.1:2543,http://127.0.0.1:2643
LOCAL_core_host=127.0.0.1
Expand Down
4 changes: 2 additions & 2 deletions src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -632,7 +632,7 @@ impl AppState {
// TODO: SPV auto-start is gated behind developer mode while SPV is in development.
// Remove the is_developer_mode() check once SPV is production-ready.
let current_context = app_state.current_app_context();
let auto_start_spv = db.get_auto_start_spv().unwrap_or(true);
let auto_start_spv = db.get_auto_start_spv().unwrap_or(false);
if auto_start_spv
&& current_context.is_developer_mode()
&& current_context.core_backend_mode() == crate::spv::CoreBackendMode::Spv
Expand Down Expand Up @@ -1081,7 +1081,7 @@ impl App for AppState {
// TODO: SPV auto-start is gated behind developer mode while SPV is in development.
// Remove the is_developer_mode() check once SPV is production-ready.
let current_context = self.current_app_context();
let auto_start_spv = current_context.db.get_auto_start_spv().unwrap_or(true);
let auto_start_spv = current_context.db.get_auto_start_spv().unwrap_or(false);
if auto_start_spv
&& current_context.is_developer_mode()
&& current_context.core_backend_mode() == crate::spv::CoreBackendMode::Spv
Expand Down
2 changes: 1 addition & 1 deletion src/database/initialization.rs
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ impl Database {
show_evonode_tools INTEGER DEFAULT 0,
user_mode TEXT DEFAULT 'Advanced',
use_local_spv_node INTEGER DEFAULT 0,
auto_start_spv INTEGER DEFAULT 1,
auto_start_spv INTEGER DEFAULT 0,
close_dash_qt_on_exit INTEGER DEFAULT 1,
selected_wallet_hash BLOB,
selected_single_key_hash BLOB
Expand Down
14 changes: 7 additions & 7 deletions src/database/settings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -316,9 +316,9 @@ impl Database {
)?;

if !column_exists {
// Default to true - auto-start SPV on startup
// Default to false - don't auto-start SPV on startup
conn.execute(
"ALTER TABLE settings ADD COLUMN auto_start_spv INTEGER DEFAULT 1;",
"ALTER TABLE settings ADD COLUMN auto_start_spv INTEGER DEFAULT 0;",
(),
)?;
}
Expand Down Expand Up @@ -363,7 +363,7 @@ impl Database {
[],
|row| row.get(0),
)?;
Ok(result.unwrap_or(true)) // Default to true
Ok(result.unwrap_or(false)) // Default to false
}

/// Adds the close_dash_qt_on_exit column to the settings table.
Expand Down Expand Up @@ -796,18 +796,18 @@ mod tests {
fn test_spv_settings() {
let db = create_test_database().expect("Failed to create test database");

// Test auto_start_spv (default true)
// Test auto_start_spv (default false)
let auto_start = db
.get_auto_start_spv()
.expect("Failed to get auto_start_spv");
assert!(auto_start);
assert!(!auto_start);

db.update_auto_start_spv(false)
db.update_auto_start_spv(true)
.expect("Failed to update auto_start_spv");
let auto_start = db
.get_auto_start_spv()
.expect("Failed to get auto_start_spv");
assert!(!auto_start);
assert!(auto_start);

// Test use_local_spv_node (default false)
let use_local = db
Expand Down
2 changes: 1 addition & 1 deletion src/ui/network_chooser_screen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ impl NetworkChooserScreen {
.db
.get_use_local_spv_node()
.unwrap_or(false);
let auto_start_spv = mainnet_app_context.db.get_auto_start_spv().unwrap_or(true);
let auto_start_spv = mainnet_app_context.db.get_auto_start_spv().unwrap_or(false);
let close_dash_qt_on_exit = mainnet_app_context
.db
.get_close_dash_qt_on_exit()
Expand Down
Loading