mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 12:17:58 +00:00
Kill the light client, CHTs and change tries. (#10080)
* Remove light client, change tries and CHTs * Update tests * fmt * Restore changes_root * Fixed benches * Cargo fmt * fmt * fmt
This commit is contained in:
@@ -591,7 +591,6 @@ impl BenchKeyring {
|
||||
/// Generate genesis with accounts from this keyring endowed with some balance.
|
||||
pub fn generate_genesis(&self) -> node_runtime::GenesisConfig {
|
||||
crate::genesis::config_endowed(
|
||||
false,
|
||||
Some(node_runtime::wasm_binary_unwrap()),
|
||||
self.collect_account_ids(),
|
||||
)
|
||||
|
||||
@@ -42,13 +42,11 @@ pub type Transaction = sc_client_api::backend::TransactionFor<Backend, node_prim
|
||||
|
||||
/// Genesis configuration parameters for `TestClient`.
|
||||
#[derive(Default)]
|
||||
pub struct GenesisParameters {
|
||||
support_changes_trie: bool,
|
||||
}
|
||||
pub struct GenesisParameters;
|
||||
|
||||
impl substrate_test_client::GenesisInit for GenesisParameters {
|
||||
fn genesis_storage(&self) -> Storage {
|
||||
crate::genesis::config(self.support_changes_trie, None).build_storage().unwrap()
|
||||
crate::genesis::config(None).build_storage().unwrap()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -24,22 +24,17 @@ use node_runtime::{
|
||||
GenesisConfig, GrandpaConfig, IndicesConfig, SessionConfig, SocietyConfig, StakerStatus,
|
||||
StakingConfig, SystemConfig, BABE_GENESIS_EPOCH_CONFIG,
|
||||
};
|
||||
use sp_core::ChangesTrieConfiguration;
|
||||
use sp_keyring::{Ed25519Keyring, Sr25519Keyring};
|
||||
use sp_runtime::Perbill;
|
||||
|
||||
/// Create genesis runtime configuration for tests.
|
||||
pub fn config(support_changes_trie: bool, code: Option<&[u8]>) -> GenesisConfig {
|
||||
config_endowed(support_changes_trie, code, Default::default())
|
||||
pub fn config(code: Option<&[u8]>) -> GenesisConfig {
|
||||
config_endowed(code, Default::default())
|
||||
}
|
||||
|
||||
/// Create genesis runtime configuration for tests with some extra
|
||||
/// endowed accounts.
|
||||
pub fn config_endowed(
|
||||
support_changes_trie: bool,
|
||||
code: Option<&[u8]>,
|
||||
extra_endowed: Vec<AccountId>,
|
||||
) -> GenesisConfig {
|
||||
pub fn config_endowed(code: Option<&[u8]>, extra_endowed: Vec<AccountId>) -> GenesisConfig {
|
||||
let mut endowed = vec![
|
||||
(alice(), 111 * DOLLARS),
|
||||
(bob(), 100 * DOLLARS),
|
||||
@@ -53,11 +48,6 @@ pub fn config_endowed(
|
||||
|
||||
GenesisConfig {
|
||||
system: SystemConfig {
|
||||
changes_trie_config: if support_changes_trie {
|
||||
Some(ChangesTrieConfiguration { digest_interval: 2, digest_levels: 2 })
|
||||
} else {
|
||||
None
|
||||
},
|
||||
code: code.map(|x| x.to_vec()).unwrap_or_else(|| wasm_binary_unwrap().to_vec()),
|
||||
},
|
||||
indices: IndicesConfig { indices: vec![] },
|
||||
|
||||
Reference in New Issue
Block a user