Skip to content

Commit

Permalink
Merge pull request #2840 from subspace/disable-snap-sync-for-domains
Browse files Browse the repository at this point in the history
Disable snap-sync for domains.
  • Loading branch information
nazar-pc authored Jun 11, 2024
2 parents 0adf220 + ee4c1db commit e6039f5
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions crates/subspace-node/src/commands/run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ use sp_messenger::messages::ChainId;
use std::env;
use subspace_metrics::{start_prometheus_metrics_server, RegistryAdapter};
use subspace_runtime::{Block, RuntimeApi};
use subspace_service::config::ChainSyncMode;
use tracing::{debug, error, info, info_span, warn};

/// Options for running a node
Expand Down Expand Up @@ -115,6 +116,12 @@ pub async fn run(run_options: RunOptions) -> Result<(), Error> {
info!("🏷 Node name: {}", subspace_configuration.network.node_name);
info!("💾 Node path: {}", base_path.display());

if maybe_domain_configuration.is_some() && subspace_configuration.sync == ChainSyncMode::Snap {
return Err(Error::Other(
"Snap sync mode is not supported for domains".to_string(),
));
}

if maybe_domain_configuration.is_some()
&& (matches!(
subspace_configuration.blocks_pruning,
Expand Down

0 comments on commit e6039f5

Please sign in to comment.