Skip to content

Commit 0e190b5

Browse files
committed
Extract simple-backend into separate crate
1 parent 96e0be1 commit 0e190b5

6 files changed

Lines changed: 32 additions & 3 deletions

File tree

Cargo.lock

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ dancelight-runtime = { git = "https://github.com/moondance-labs/tanssi", branch
2323
dancelight-runtime-constants = { git = "https://github.com/moondance-labs/tanssi", branch = "master", default-features = false }
2424
externalities-without-storage-root = { path = "crates/externalities-without-storage-root" }
2525
fuzz-dancelight = { path = "fuzzers/fuzz-dancelight" }
26+
simple-backend-read-only = { path = "crates/simple-backend-read-only" }
2627
pallet-configuration = { git = "https://github.com/moondance-labs/tanssi", branch = "master", default-features = false }
2728
starlight-runtime = { git = "https://github.com/moondance-labs/tanssi", branch = "master", default-features = false }
2829
starlight-runtime-constants = { git = "https://github.com/moondance-labs/tanssi", branch = "master", default-features = false }
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
[package]
2+
name = "simple-backend-read-only"
3+
authors = { workspace = true }
4+
edition = "2024"
5+
license = "GPL-3.0-only"
6+
version = "0.1.0"
7+
8+
[dependencies]
9+
hex-literal = { workspace = true }
10+
sp-core = { workspace = true }
11+
sp-state-machine = { workspace = true }
12+
sp-storage = { workspace = true }
13+
trie-db = { workspace = true }
14+
15+
[lints]
16+
workspace = true

fuzzers/fuzz-dancelight/src/simple_backend.rs renamed to crates/simple-backend-read-only/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ use sp_storage::{ChildInfo, StateVersion, Storage};
77
use std::ops::Bound::{Excluded, Included, Unbounded};
88
use trie_db::{DBValue, MerkleValue};
99

10+
/// Read-only [sp_state_machine::Backend].
1011
pub struct SimpleBackend {
1112
base: &'static Storage,
1213
}

fuzzers/fuzz-dancelight/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ license = "GPL-3.0-only"
66
version = "0.1.0"
77

88
[dependencies]
9+
simple-backend-read-only = { workspace = true }
910
alloy-core = { workspace = true }
1011
bitvec = { workspace = true }
1112
cumulus-primitives-core = { workspace = true }

fuzzers/fuzz-dancelight/src/lib.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ use crate::genesis::invulnerables_from_seeds;
1212
use crate::metadata::{
1313
ACCOUNT_ID_TYPE_ID, METADATA, RUNTIME_CALL_TYPE_ID, call_name_from_idx, event_name_from_idx,
1414
};
15-
use crate::simple_backend::SimpleBackend;
15+
use simple_backend_read_only::SimpleBackend;
1616
use crate::storage_tracer::{BlockContext, ExtStorageTracer, TracingExt};
1717
use dancelight_runtime::bridge_to_ethereum_config::EthereumGatewayAddress;
1818
use dancelight_runtime::{
@@ -86,8 +86,6 @@ mod genesis;
8686
mod metadata;
8787
mod mutators;
8888
mod read_snapshot;
89-
// TODO: extract to separate crate to speed up compilation
90-
mod simple_backend;
9189
mod storage_tracer;
9290

9391
use crate::event_tracer::EventTracer;

0 commit comments

Comments
 (0)