mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-25 03:37:56 +00:00
Update substrate and polkadot (#50)
* Update Cargo.lock * Fix for substrate update * Update Cargo.lock * Fix for substrate update * Fix for substrate update * Fix for substrate update * Fix for substrate update * Update Cargo.lock * Fix for substrate update * Fix for substrate update * Fix for substrate update * Fix for substrate update * Fix for substrate update * WIP * Temporary fix until polkadot is fixed * WIP * WIP
This commit is contained in:
+10
-5
@@ -21,7 +21,7 @@ use runtime::{
|
||||
genesismap::{additional_storage_with_genesis, GenesisConfig},
|
||||
Block,
|
||||
};
|
||||
use sp_core::{sr25519, storage::Storage};
|
||||
use sp_core::{sr25519, storage::Storage, ChangesTrieConfiguration};
|
||||
use sp_keyring::{AccountKeyring, Sr25519Keyring};
|
||||
use sp_runtime::traits::{Block as BlockT, Hash as HashT, Header as HeaderT};
|
||||
pub use test_client::*;
|
||||
@@ -46,7 +46,7 @@ pub type Executor =
|
||||
sc_client::LocalCallExecutor<Backend, sc_executor::NativeExecutor<LocalExecutor>>;
|
||||
|
||||
/// Test client builder for Cumulus
|
||||
pub type TestClientBuilder = test_client::TestClientBuilder<Executor, Backend, GenesisParameters>;
|
||||
pub type TestClientBuilder = test_client::TestClientBuilder<Block, Executor, Backend, GenesisParameters>;
|
||||
|
||||
/// LongestChain type for the test runtime/client.
|
||||
pub type LongestChain = test_client::sc_client::LongestChain<Backend, Block>;
|
||||
@@ -64,7 +64,12 @@ impl test_client::GenesisInit for GenesisParameters {
|
||||
fn genesis_storage(&self) -> Storage {
|
||||
use codec::Encode;
|
||||
|
||||
let mut storage = genesis_config(self.support_changes_trie).genesis_map();
|
||||
let changes_trie_config: Option<ChangesTrieConfiguration> = if self.support_changes_trie {
|
||||
Some(sp_test_primitives::changes_trie_config())
|
||||
} else {
|
||||
None
|
||||
};
|
||||
let mut storage = genesis_config(changes_trie_config).genesis_map();
|
||||
|
||||
let child_roots = storage.children.iter().map(|(sk, child_content)| {
|
||||
let state_root =
|
||||
@@ -121,9 +126,9 @@ impl DefaultTestClientBuilderExt for TestClientBuilder {
|
||||
}
|
||||
}
|
||||
|
||||
fn genesis_config(support_changes_trie: bool) -> GenesisConfig {
|
||||
fn genesis_config(changes_trie_config: Option<ChangesTrieConfiguration>) -> GenesisConfig {
|
||||
GenesisConfig::new(
|
||||
support_changes_trie,
|
||||
changes_trie_config,
|
||||
vec![
|
||||
sr25519::Public::from(Sr25519Keyring::Alice).into(),
|
||||
sr25519::Public::from(Sr25519Keyring::Bob).into(),
|
||||
|
||||
Reference in New Issue
Block a user