diff --git a/Cargo.lock b/Cargo.lock index 3debaf8f7886..0fa585bb6e9e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -13976,6 +13976,7 @@ dependencies = [ "parity-scale-codec", "polkadot-sdk-frame 0.1.0", "scale-info", + "sp-mmr-primitives 26.0.0", "sp-tracing 16.0.0", ] @@ -19272,7 +19273,6 @@ dependencies = [ "sp-inherents 26.0.0", "sp-io 30.0.0", "sp-keyring 31.0.0", - "sp-mmr-primitives 26.0.0", "sp-offchain 26.0.0", "sp-runtime 31.0.1", "sp-session 27.0.0", diff --git a/substrate/frame/Cargo.toml b/substrate/frame/Cargo.toml index ae449cc11b57..8fc0d8468430 100644 --- a/substrate/frame/Cargo.toml +++ b/substrate/frame/Cargo.toml @@ -43,7 +43,6 @@ sp-consensus-grandpa = { optional = true, workspace = true } sp-genesis-builder = { optional = true, workspace = true } sp-inherents = { optional = true, workspace = true } sp-keyring = { optional = true, workspace = true } -sp-mmr-primitives = { optional = true, workspace = true } sp-offchain = { optional = true, workspace = true } sp-session = { optional = true, workspace = true } sp-storage = { optional = true, workspace = true } @@ -79,7 +78,6 @@ runtime = [ "sp-genesis-builder", "sp-inherents", "sp-keyring", - "sp-mmr-primitives", "sp-offchain", "sp-session", "sp-storage", @@ -107,7 +105,6 @@ std = [ "sp-inherents?/std", "sp-io/std", "sp-keyring?/std", - "sp-mmr-primitives?/std", "sp-offchain?/std", "sp-runtime/std", "sp-session?/std", diff --git a/substrate/frame/merkle-mountain-range/Cargo.toml b/substrate/frame/merkle-mountain-range/Cargo.toml index fedbfa2cbf52..06eeab97c261 100644 --- a/substrate/frame/merkle-mountain-range/Cargo.toml +++ b/substrate/frame/merkle-mountain-range/Cargo.toml @@ -19,6 +19,7 @@ codec = { workspace = true } frame = { workspace = true, features = ["experimental", "runtime"] } log = { workspace = true } scale-info = { features = ["derive"], workspace = true } +sp-mmr-primitives = { workspace = true } [dev-dependencies] array-bytes = { workspace = true, default-features = true } @@ -32,6 +33,7 @@ std = [ "frame/std", "log/std", "scale-info/std", + "sp-mmr-primitives/std", ] runtime-benchmarks = [ "frame/runtime-benchmarks", diff --git a/substrate/frame/merkle-mountain-range/src/default_weights.rs b/substrate/frame/merkle-mountain-range/src/default_weights.rs index 93e57c788905..d1ed12edd062 100644 --- a/substrate/frame/merkle-mountain-range/src/default_weights.rs +++ b/substrate/frame/merkle-mountain-range/src/default_weights.rs @@ -18,7 +18,7 @@ //! Default weights for the MMR Pallet //! This file was not auto-generated. -use frame::weights_prelude::{weights_constants::WEIGHT_REF_TIME_PER_NANOS, *}; +use frame::{deps::frame_support::weights::constants::*, weights_prelude::*}; impl crate::WeightInfo for () { fn on_initialize(peaks: u32) -> Weight { diff --git a/substrate/frame/merkle-mountain-range/src/lib.rs b/substrate/frame/merkle-mountain-range/src/lib.rs index f7e1e37589d3..3d04fdf04a85 100644 --- a/substrate/frame/merkle-mountain-range/src/lib.rs +++ b/substrate/frame/merkle-mountain-range/src/lib.rs @@ -61,11 +61,10 @@ extern crate alloc; use alloc::vec::Vec; use log; -pub use frame::{ - deps::sp_mmr_primitives::{ - self as primitives, utils, utils::NodesUtils, Error, LeafDataProvider, LeafIndex, NodeIndex, - }, - prelude::*, +pub use frame::prelude::*; + +pub use sp_mmr_primitives::{ + self as primitives, utils, utils::NodesUtils, Error, LeafDataProvider, LeafIndex, NodeIndex, }; pub use pallet::*; diff --git a/substrate/frame/src/lib.rs b/substrate/frame/src/lib.rs index 4df9e09a80c3..15601ebde1f2 100644 --- a/substrate/frame/src/lib.rs +++ b/substrate/frame/src/lib.rs @@ -290,7 +290,6 @@ pub mod weights_prelude { pub use frame_support::{ traits::Get, weights::{ - constants as weights_constants, constants::{ParityDbWeight, RocksDbWeight}, Weight, }, @@ -566,7 +565,6 @@ pub mod deps { pub use sp_arithmetic; pub use sp_core; pub use sp_io; - pub use sp_mmr_primitives; pub use sp_runtime; pub use codec;