mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-14 15:41:02 +00:00
Remove light client companion (#4191)
* Remove light client companion * Update substrate * cargo fmt * Fixed benches * fmt
This commit is contained in:
@@ -32,7 +32,7 @@ use sp_runtime::{
|
||||
traits::{BlakeTwo256, Block as BlockT},
|
||||
Justifications,
|
||||
};
|
||||
use sp_storage::{ChildInfo, PrefixedStorageKey, StorageData, StorageKey};
|
||||
use sp_storage::{ChildInfo, StorageData, StorageKey};
|
||||
use std::sync::Arc;
|
||||
|
||||
pub type FullBackend = sc_service::TFullBackend<Block>;
|
||||
@@ -514,36 +514,6 @@ impl sc_client_api::StorageProvider<Block, crate::FullBackend> for Client {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn max_key_changes_range(
|
||||
&self,
|
||||
first: NumberFor<Block>,
|
||||
last: BlockId<Block>,
|
||||
) -> sp_blockchain::Result<Option<(NumberFor<Block>, BlockId<Block>)>> {
|
||||
with_client! {
|
||||
self,
|
||||
client,
|
||||
{
|
||||
client.max_key_changes_range(first, last)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn key_changes(
|
||||
&self,
|
||||
first: NumberFor<Block>,
|
||||
last: BlockId<Block>,
|
||||
storage_key: Option<&PrefixedStorageKey>,
|
||||
key: &StorageKey,
|
||||
) -> sp_blockchain::Result<Vec<(NumberFor<Block>, u32)>> {
|
||||
with_client! {
|
||||
self,
|
||||
client,
|
||||
{
|
||||
client.key_changes(first, last, storage_key, key)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl sp_blockchain::HeaderBackend<Block> for Client {
|
||||
|
||||
@@ -174,10 +174,6 @@ impl sp_externalities::Externalities for ValidationExternalities {
|
||||
panic!("child_storage_root: unsupported feature for parachain validation")
|
||||
}
|
||||
|
||||
fn storage_changes_root(&mut self, _: &[u8]) -> Result<Option<Vec<u8>>, ()> {
|
||||
panic!("storage_changes_root: unsupported feature for parachain validation")
|
||||
}
|
||||
|
||||
fn next_child_storage_key(&self, _: &ChildInfo, _: &[u8]) -> Option<Vec<u8>> {
|
||||
panic!("next_child_storage_key: unsupported feature for parachain validation")
|
||||
}
|
||||
|
||||
@@ -303,10 +303,7 @@ fn polkadot_staging_testnet_config_genesis(wasm_binary: &[u8]) -> polkadot::Gene
|
||||
const STASH: u128 = 100 * DOT;
|
||||
|
||||
polkadot::GenesisConfig {
|
||||
system: polkadot::SystemConfig {
|
||||
code: wasm_binary.to_vec(),
|
||||
changes_trie_config: Default::default(),
|
||||
},
|
||||
system: polkadot::SystemConfig { code: wasm_binary.to_vec() },
|
||||
balances: polkadot::BalancesConfig {
|
||||
balances: endowed_accounts
|
||||
.iter()
|
||||
@@ -494,10 +491,7 @@ fn westend_staging_testnet_config_genesis(wasm_binary: &[u8]) -> westend::Genesi
|
||||
const STASH: u128 = 100 * WND;
|
||||
|
||||
westend::GenesisConfig {
|
||||
system: westend::SystemConfig {
|
||||
code: wasm_binary.to_vec(),
|
||||
changes_trie_config: Default::default(),
|
||||
},
|
||||
system: westend::SystemConfig { code: wasm_binary.to_vec() },
|
||||
balances: westend::BalancesConfig {
|
||||
balances: endowed_accounts
|
||||
.iter()
|
||||
@@ -685,10 +679,7 @@ fn kusama_staging_testnet_config_genesis(wasm_binary: &[u8]) -> kusama::GenesisC
|
||||
const STASH: u128 = 100 * KSM;
|
||||
|
||||
kusama::GenesisConfig {
|
||||
system: kusama::SystemConfig {
|
||||
code: wasm_binary.to_vec(),
|
||||
changes_trie_config: Default::default(),
|
||||
},
|
||||
system: kusama::SystemConfig { code: wasm_binary.to_vec() },
|
||||
balances: kusama::BalancesConfig {
|
||||
balances: endowed_accounts
|
||||
.iter()
|
||||
@@ -1000,10 +991,7 @@ fn rococo_staging_testnet_config_genesis(wasm_binary: &[u8]) -> rococo_runtime::
|
||||
const STASH: u128 = 100 * ROC;
|
||||
|
||||
rococo_runtime::GenesisConfig {
|
||||
system: rococo_runtime::SystemConfig {
|
||||
code: wasm_binary.to_vec(),
|
||||
changes_trie_config: Default::default(),
|
||||
},
|
||||
system: rococo_runtime::SystemConfig { code: wasm_binary.to_vec() },
|
||||
balances: rococo_runtime::BalancesConfig {
|
||||
balances: endowed_accounts
|
||||
.iter()
|
||||
@@ -1260,10 +1248,7 @@ pub fn polkadot_testnet_genesis(
|
||||
const STASH: u128 = 100 * DOT;
|
||||
|
||||
polkadot::GenesisConfig {
|
||||
system: polkadot::SystemConfig {
|
||||
code: wasm_binary.to_vec(),
|
||||
changes_trie_config: Default::default(),
|
||||
},
|
||||
system: polkadot::SystemConfig { code: wasm_binary.to_vec() },
|
||||
indices: polkadot::IndicesConfig { indices: vec![] },
|
||||
balances: polkadot::BalancesConfig {
|
||||
balances: endowed_accounts.iter().map(|k| (k.clone(), ENDOWMENT)).collect(),
|
||||
@@ -1347,10 +1332,7 @@ pub fn kusama_testnet_genesis(
|
||||
const STASH: u128 = 100 * KSM;
|
||||
|
||||
kusama::GenesisConfig {
|
||||
system: kusama::SystemConfig {
|
||||
code: wasm_binary.to_vec(),
|
||||
changes_trie_config: Default::default(),
|
||||
},
|
||||
system: kusama::SystemConfig { code: wasm_binary.to_vec() },
|
||||
indices: kusama::IndicesConfig { indices: vec![] },
|
||||
balances: kusama::BalancesConfig {
|
||||
balances: endowed_accounts.iter().map(|k| (k.clone(), ENDOWMENT)).collect(),
|
||||
@@ -1436,10 +1418,7 @@ pub fn westend_testnet_genesis(
|
||||
const STASH: u128 = 100 * DOT;
|
||||
|
||||
westend::GenesisConfig {
|
||||
system: westend::SystemConfig {
|
||||
code: wasm_binary.to_vec(),
|
||||
changes_trie_config: Default::default(),
|
||||
},
|
||||
system: westend::SystemConfig { code: wasm_binary.to_vec() },
|
||||
indices: westend::IndicesConfig { indices: vec![] },
|
||||
balances: westend::BalancesConfig {
|
||||
balances: endowed_accounts.iter().map(|k| (k.clone(), ENDOWMENT)).collect(),
|
||||
@@ -1518,10 +1497,7 @@ pub fn rococo_testnet_genesis(
|
||||
const ENDOWMENT: u128 = 1_000_000 * DOT;
|
||||
|
||||
rococo_runtime::GenesisConfig {
|
||||
system: rococo_runtime::SystemConfig {
|
||||
code: wasm_binary.to_vec(),
|
||||
changes_trie_config: Default::default(),
|
||||
},
|
||||
system: rococo_runtime::SystemConfig { code: wasm_binary.to_vec() },
|
||||
beefy: Default::default(),
|
||||
indices: rococo_runtime::IndicesConfig { indices: vec![] },
|
||||
balances: rococo_runtime::BalancesConfig {
|
||||
|
||||
@@ -107,8 +107,7 @@ pub use sp_api::{ApiRef, ConstructRuntimeApi, Core as CoreApi, ProvideRuntimeApi
|
||||
pub use sp_runtime::{
|
||||
generic,
|
||||
traits::{
|
||||
self as runtime_traits, BlakeTwo256, Block as BlockT, DigestFor, HashFor,
|
||||
Header as HeaderT, NumberFor,
|
||||
self as runtime_traits, BlakeTwo256, Block as BlockT, HashFor, Header as HeaderT, NumberFor,
|
||||
},
|
||||
};
|
||||
|
||||
@@ -795,7 +794,6 @@ where
|
||||
transaction_pool: transaction_pool.clone(),
|
||||
spawn_handle: task_manager.spawn_handle(),
|
||||
import_queue,
|
||||
on_demand: None,
|
||||
block_announce_validator_builder: None,
|
||||
warp_sync: Some(warp_sync),
|
||||
})?;
|
||||
@@ -865,8 +863,6 @@ where
|
||||
rpc_extensions_builder: Box::new(rpc_extensions_builder),
|
||||
transaction_pool: transaction_pool.clone(),
|
||||
task_manager: &mut task_manager,
|
||||
on_demand: None,
|
||||
remote_blockchain: None,
|
||||
system_rpc_tx,
|
||||
telemetry: telemetry.as_mut(),
|
||||
})?;
|
||||
|
||||
Reference in New Issue
Block a user