Skip to content

Commit

Permalink
Update fast-sync after latest polkadot-sdk
Browse files Browse the repository at this point in the history
  • Loading branch information
shamil-gadelshin committed May 30, 2024
1 parent af9ec7d commit 1c4785b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
11 changes: 1 addition & 10 deletions crates/subspace-service/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ use sc_proof_of_time::source::gossip::pot_gossip_peers_set_config;
use sc_proof_of_time::source::{PotSlotInfo, PotSourceWorker};
use sc_proof_of_time::verifier::PotVerifier;
use sc_service::error::Error as ServiceError;
use sc_service::{ClientExt, Configuration, NetworkStarter, SpawnTasksParams, TaskManager};
use sc_service::{Configuration, NetworkStarter, SpawnTasksParams, TaskManager};
use sc_subspace_block_relay::{
build_consensus_relay, BlockRelayConfigurationError, NetworkWrapper,
};
Expand Down Expand Up @@ -722,15 +722,6 @@ where
mut telemetry,
} = other;

// TODO: This will not be needed once we clear block gap correctly after sync is done
if config.sync == ChainSyncMode::Snap {
let info = client.info();
if info.best_hash != info.genesis_hash {
debug!(?info, "Clear block gap after fast-sync");
client.clear_block_gap();
}
}

let offchain_indexing_enabled = config.offchain_worker.indexing_enabled;
let (node, bootstrap_nodes) = match config.subspace_networking {
SubspaceNetworking::Reuse {
Expand Down
2 changes: 1 addition & 1 deletion crates/subspace-service/src/sync_from_dsn/fast_sync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ where
// Clear the block gap that arises from first block import with a much higher number than
// previously (resulting in a gap)
// TODO: This is a hack and better solution is needed: https://github.com/paritytech/polkadot-sdk/issues/4407
client.clear_block_gap();
client.clear_block_gap()?;

debug!(info = ?client.info(), "Fast sync finished successfully");

Expand Down

0 comments on commit 1c4785b

Please sign in to comment.