Skip to content

Commit

Permalink
Replace substrate-test-runtime with subcoin-runtime in sc-fast-sync-b…
Browse files Browse the repository at this point in the history
…ackend

This avoids more unnecessary deps.
  • Loading branch information
liuchengxu committed Jul 8, 2024
1 parent 7513612 commit d2fc630
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 272 deletions.
269 changes: 1 addition & 268 deletions Cargo.lock

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

1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ sp-version = { git = "https://github.com/liuchengxu/polkadot-sdk", branch = "sub
substrate-build-script-utils = { git = "https://github.com/liuchengxu/polkadot-sdk", branch = "subcoin" }
substrate-frame-rpc-system = { git = "https://github.com/liuchengxu/polkadot-sdk", branch = "subcoin" }
substrate-wasm-builder = { git = "https://github.com/liuchengxu/polkadot-sdk", branch = "subcoin" }
substrate-test-runtime = { git = "https://github.com/liuchengxu/polkadot-sdk", branch = "subcoin" }

pallet-bitcoin = { path = "crates/pallet-bitcoin", default-features = false }
pallet-executive = { path = "crates/pallet-executive", default-features = false }
Expand Down
2 changes: 1 addition & 1 deletion crates/sc-fast-sync-backend/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ sp-trie = { workspace = true }
tracing = { workspace = true }

[dev-dependencies]
substrate-test-runtime = { workspace = true }
subcoin-runtime = { workspace = true }
6 changes: 4 additions & 2 deletions crates/sc-fast-sync-backend/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -888,14 +888,16 @@ pub fn check_genesis_storage(storage: &Storage) -> sp_blockchain::Result<()> {
mod tests {
use super::*;
use sp_blockchain::Backend;
use sp_core::H256;
use sp_runtime::traits::Header as HeaderT;
use sp_runtime::{ConsensusEngineId, Justifications};
use substrate_test_runtime::{Block, Header, H256};
use subcoin_runtime::interface::OpaqueBlock as Block;
use subcoin_runtime::Header;

pub const ID1: ConsensusEngineId = *b"TST1";
pub const ID2: ConsensusEngineId = *b"TST2";

fn header(number: u64) -> Header {
fn header(number: u32) -> Header {
let parent_hash = match number {
0 => Default::default(),
_ => header(number - 1).hash(),
Expand Down

0 comments on commit d2fc630

Please sign in to comment.