From 79e3a790a8f9cadc5875d7880ad6d813b91931d8 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Thu, 13 Jun 2024 11:15:32 +0200 Subject: [PATCH] Set `test-helpers` for `bp-runtime` --- bridges/primitives/runtime/src/storage_proof.rs | 4 ++-- .../runtimes/bridge-hubs/bridge-hub-rococo/Cargo.toml | 2 +- .../runtimes/bridge-hubs/bridge-hub-westend/Cargo.toml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bridges/primitives/runtime/src/storage_proof.rs b/bridges/primitives/runtime/src/storage_proof.rs index ae222d0ae5825..7f0e53977e293 100644 --- a/bridges/primitives/runtime/src/storage_proof.rs +++ b/bridges/primitives/runtime/src/storage_proof.rs @@ -21,7 +21,7 @@ use sp_core::{storage::TrackedStorageKey, RuntimeDebug}; use sp_runtime::{SaturatedConversion, StateVersion}; use sp_std::{default::Default, vec, vec::Vec}; use sp_trie::{ - generate_trie_proof, verify_trie_proof, LayoutV0, LayoutV1, PrefixedMemoryDB, StorageProof, + generate_trie_proof, verify_trie_proof, LayoutV0, LayoutV1, StorageProof, TrieDBBuilder, TrieHash, }; @@ -109,7 +109,7 @@ impl UnverifiedStorageProof { let entries: Vec<_> = entries.iter().cloned().map(|(key, val)| (None, vec![(key, val)])).collect(); let backend = - sp_state_machine::TrieBackend::, H>::from((entries, state_version)); + sp_state_machine::TrieBackend::, H>::from((entries, state_version)); let root = *backend.root(); Ok((root, UnverifiedStorageProof::try_from_db(backend.backend_storage(), root, keys)?)) diff --git a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/Cargo.toml b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/Cargo.toml index 5e8639eed36b9..d2822088fdba6 100644 --- a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/Cargo.toml +++ b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/Cargo.toml @@ -96,7 +96,7 @@ bp-parachains = { path = "../../../../../bridges/primitives/parachains", default bp-polkadot-bulletin = { path = "../../../../../bridges/chains/chain-polkadot-bulletin", default-features = false } bp-polkadot-core = { path = "../../../../../bridges/primitives/polkadot-core", default-features = false } bp-relayers = { path = "../../../../../bridges/primitives/relayers", default-features = false } -bp-runtime = { path = "../../../../../bridges/primitives/runtime", default-features = false } +bp-runtime = { path = "../../../../../bridges/primitives/runtime", default-features = false, features = ["test-helpers"] } bp-rococo = { path = "../../../../../bridges/chains/chain-rococo", default-features = false } bp-westend = { path = "../../../../../bridges/chains/chain-westend", default-features = false } pallet-bridge-grandpa = { path = "../../../../../bridges/modules/grandpa", default-features = false } diff --git a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/Cargo.toml b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/Cargo.toml index ba8e4cdc8147c..4b1799b576c18 100644 --- a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/Cargo.toml +++ b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/Cargo.toml @@ -89,7 +89,7 @@ bp-messages = { path = "../../../../../bridges/primitives/messages", default-fea bp-parachains = { path = "../../../../../bridges/primitives/parachains", default-features = false } bp-polkadot-core = { path = "../../../../../bridges/primitives/polkadot-core", default-features = false } bp-relayers = { path = "../../../../../bridges/primitives/relayers", default-features = false } -bp-runtime = { path = "../../../../../bridges/primitives/runtime", default-features = false } +bp-runtime = { path = "../../../../../bridges/primitives/runtime", default-features = false, features = ["test-helpers"] } bp-rococo = { path = "../../../../../bridges/chains/chain-rococo", default-features = false } bp-westend = { path = "../../../../../bridges/chains/chain-westend", default-features = false } pallet-bridge-grandpa = { path = "../../../../../bridges/modules/grandpa", default-features = false }