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

sp-runtime: make parity-util-mem dependency optional #12657

Merged
merged 7 commits into from
Nov 9, 2022
Merged
Show file tree
Hide file tree
Changes from 5 commits
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: 0 additions & 1 deletion 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 primitives/core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ sp-std = { version = "4.0.0", default-features = false, path = "../std" }
sp-debug-derive = { version = "4.0.0", default-features = false, path = "../debug-derive" }
sp-storage = { version = "6.0.0", default-features = false, path = "../storage" }
sp-externalities = { version = "0.12.0", optional = true, path = "../externalities" }
parity-util-mem = { version = "0.12.0", default-features = false, features = ["primitive-types"] }
futures = { version = "0.3.21", optional = true }
dyn-clonable = { version = "0.9.0", optional = true }
thiserror = { version = "1.0.30", optional = true }
Expand Down Expand Up @@ -78,7 +77,6 @@ bench = false
[features]
default = ["std"]
std = [
"parity-util-mem/std",
"merlin?/std",
"full_crypto",
"log/std",
Expand Down
2 changes: 1 addition & 1 deletion primitives/keyring/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ targets = ["x86_64-unknown-linux-gnu"]
lazy_static = "1.4.0"
strum = { version = "0.24.1", features = ["derive"] }
sp-core = { version = "6.0.0", path = "../core" }
sp-runtime = { version = "6.0.0", path = "../runtime" }
sp-runtime = { version = "6.0.0", path = "../runtime", default-features = false }
2 changes: 1 addition & 1 deletion primitives/runtime/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ either = { version = "1.5", default-features = false }
hash256-std-hasher = { version = "0.15.2", default-features = false }
impl-trait-for-tuples = "0.2.2"
log = { version = "0.4.17", default-features = false }
parity-util-mem = { version = "0.12.0", default-features = false, features = ["primitive-types"] }
parity-util-mem = { version = "0.12.0", default-features = false, features = ["primitive-types"], optional = true }
paste = "1.0"
rand = { version = "0.7.2", optional = true }
scale-info = { version = "2.1.1", default-features = false, features = ["derive"] }
Expand Down
5 changes: 2 additions & 3 deletions primitives/runtime/src/transaction_validity.rs
Original file line number Diff line number Diff line change
Expand Up @@ -226,9 +226,8 @@ impl From<UnknownTransaction> for TransactionValidity {
/// Depending on the source we might apply different validation schemes.
/// For instance we can disallow specific kinds of transactions if they were not produced
/// by our local node (for instance off-chain workers).
#[derive(
Copy, Clone, PartialEq, Eq, Encode, Decode, RuntimeDebug, parity_util_mem::MallocSizeOf,
)]
#[derive(Copy, Clone, PartialEq, Eq, Encode, Decode, RuntimeDebug)]
#[cfg_attr(feature = "std", derive(parity_util_mem::MallocSizeOf))]
pub enum TransactionSource {
/// Transaction is already included in block.
///
Expand Down