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

* `sp-runtime`: make `parity-util-mem` dependency optional

* Use default-features = false for sp-runtime in sp-keyring

* Remove parity-util-mem from sp-core

* Cargo.lock

* Restore default-features for keyring dependency
This commit is contained in:
Andrew Jones
2022-11-09 21:30:50 +00:00
committed by GitHub
parent 11a01e89e3
commit da46ab18ec
4 changed files with 3 additions and 7 deletions
+1 -1
View File
@@ -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"] }
@@ -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.
///