Skip to content

Commit

Permalink
remove node-executor node-primitive deps
Browse files Browse the repository at this point in the history
  • Loading branch information
liamaharon committed May 9, 2024
1 parent b27fd10 commit 62d9696
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 20 deletions.
2 changes: 0 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,6 @@ sp-weights = { git = "https://github.com/paritytech/polkadot-sdk", branch = "lia
substrate-cli-test-utils = { git = "https://github.com/paritytech/polkadot-sdk", branch = "liam-remote-ext-snapshot-header" }
substrate-rpc-client = { git = "https://github.com/paritytech/polkadot-sdk", branch = "liam-remote-ext-snapshot-header" }

node-executor = { package = "staging-node-executor", git = "https://github.com/paritytech/polkadot-sdk", branch = "liam-remote-ext-snapshot-header" }
node-primitives = { git = "https://github.com/paritytech/polkadot-sdk", branch = "liam-remote-ext-snapshot-header" }
polkadot-primitives = { git = "https://github.com/paritytech/polkadot-sdk", branch = "liam-remote-ext-snapshot-header" }
cumulus-primitives-parachain-inherent = { git = "https://github.com/paritytech/polkadot-sdk", branch = "liam-remote-ext-snapshot-header" }
cumulus-primitives-core = { git = "https://github.com/paritytech/polkadot-sdk", branch = "liam-remote-ext-snapshot-header" }
Expand Down
2 changes: 0 additions & 2 deletions cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ sp-runtime = { workspace = true }
sp-state-machine = { workspace = true }
sp-storage = { workspace = true }

node-primitives = { workspace = true }

try-runtime-core = { workspace = true }

frame-support = { workspace = true }
2 changes: 0 additions & 2 deletions core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ frame-try-runtime = { workspace = true, features=["try-runtime"] }
sc-cli = { workspace = true }
sc-executor = { workspace = true }

node-primitives = { workspace = true }

sp-api = { workspace = true }
sp-consensus-aura = { workspace = true }
sp-consensus-babe = { workspace = true }
Expand Down
29 changes: 19 additions & 10 deletions core/tests/create_snapshot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,11 @@ use std::{

use assert_cmd::cargo::cargo_bin;
use frame_remote_externalities::{Builder, Mode, OfflineConfig, SnapshotConfig};
use node_primitives::{Block, Hash};
use sp_runtime::{
generic::{Block, Header},
traits::BlakeTwo256,
OpaqueExtrinsic,
};
use substrate_cli_test_utils as common;
use tokio::process::Command;

Expand Down Expand Up @@ -57,7 +61,11 @@ async fn create_snapshot_works() {
let snap_file_path = temp_dir.path().join("snapshot.snap");

common::run_with_timeout(Duration::from_secs(60), async move {
fn create_snapshot(ws_url: &str, snap_file: &PathBuf, at: Hash) -> tokio::process::Child {
fn create_snapshot(
ws_url: &str,
snap_file: &PathBuf,
at: sp_core::H256,
) -> tokio::process::Child {
Command::new(cargo_bin("try-runtime"))
.stdout(std::process::Stdio::piped())
.stderr(std::process::Stdio::piped())
Expand All @@ -82,14 +90,15 @@ async fn create_snapshot_works() {
assert!(snapshot_is_on_disk, "Snapshot was not written to disk");

// Try and load the snapshot we have created by running `create-snapshot`.
let snapshot_loading_result = Builder::<Block>::new()
.mode(Mode::Offline(OfflineConfig {
state_snapshot: SnapshotConfig {
path: snap_file_path,
},
}))
.build()
.await;
let snapshot_loading_result =
Builder::<Block<Header<u32, BlakeTwo256>, OpaqueExtrinsic>>::new()
.mode(Mode::Offline(OfflineConfig {
state_snapshot: SnapshotConfig {
path: snap_file_path,
},
}))
.build()
.await;

assert!(
snapshot_loading_result.is_ok(),
Expand Down
3 changes: 1 addition & 2 deletions core/tests/execute_block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
use std::time::Duration;

use assert_cmd::cargo::cargo_bin;
use node_primitives::Hash;
use regex::Regex;
use substrate_cli_test_utils as common;
use tokio::process::Command;
Expand Down Expand Up @@ -49,7 +48,7 @@ async fn execute_block_works() {
common::run_with_timeout(Duration::from_secs(60), async move {
let ws_url = format!("ws://localhost:{}", port);

fn execute_block(ws_url: &str, at: Hash) -> tokio::process::Child {
fn execute_block(ws_url: &str, at: sp_core::H256) -> tokio::process::Child {
Command::new(cargo_bin("try-runtime"))
.stdout(std::process::Stdio::piped())
.stderr(std::process::Stdio::piped())
Expand Down

0 comments on commit 62d9696

Please sign in to comment.