Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Update for warp sync #3564

Merged
6 commits merged into from
Oct 7, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
1 change: 1 addition & 0 deletions node/core/chain-api/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ impl HeaderBackend<Block> for TestClient {
finalized_number,
number_leaves: 0,
finalized_state: None,
block_gap: None,
}
}
fn number(&self, hash: Hash) -> sp_blockchain::Result<Option<BlockNumber>> {
Expand Down
7 changes: 7 additions & 0 deletions node/service/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -690,9 +690,16 @@ where
multiplexer
};

let grandpa_hard_forks = if config.chain_spec.is_kusama() {
grandpa_support::kusama_hard_forks()
} else {
Vec::new()
};

let warp_sync = Arc::new(grandpa::warp_proof::NetworkProvider::new(
backend.clone(),
import_setup.1.shared_authority_set().clone(),
grandpa_hard_forks,
));

let (network, system_rpc_tx, network_starter) =
Expand Down