mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-09 20:11:09 +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:
@@ -288,10 +288,6 @@ fn generate_runtime_api_base_structures() -> Result<TokenStream> {
|
||||
fn into_storage_changes(
|
||||
&self,
|
||||
backend: &Self::StateBackend,
|
||||
changes_trie_state: Option<&#crate_::ChangesTrieState<
|
||||
#crate_::HashFor<Block>,
|
||||
#crate_::NumberFor<Block>,
|
||||
>>,
|
||||
parent_hash: Block::Hash,
|
||||
) -> std::result::Result<
|
||||
#crate_::StorageChanges<C::StateBackend, Block>,
|
||||
@@ -299,7 +295,6 @@ fn generate_runtime_api_base_structures() -> Result<TokenStream> {
|
||||
> where Self: Sized {
|
||||
self.changes.replace(Default::default()).into_storage_changes(
|
||||
backend,
|
||||
changes_trie_state,
|
||||
parent_hash,
|
||||
self.storage_transaction_cache.replace(Default::default()),
|
||||
)
|
||||
|
||||
@@ -116,10 +116,6 @@ fn implement_common_api_traits(block_type: TypePath, self_ty: Type) -> Result<To
|
||||
fn into_storage_changes(
|
||||
&self,
|
||||
_: &Self::StateBackend,
|
||||
_: Option<&#crate_::ChangesTrieState<
|
||||
#crate_::HashFor<#block_type>,
|
||||
#crate_::NumberFor<#block_type>,
|
||||
>>,
|
||||
_: <#block_type as #crate_::BlockT>::Hash,
|
||||
) -> std::result::Result<
|
||||
#crate_::StorageChanges<Self::StateBackend, #block_type>,
|
||||
|
||||
@@ -97,7 +97,7 @@ pub use sp_runtime::{
|
||||
#[doc(hidden)]
|
||||
#[cfg(feature = "std")]
|
||||
pub use sp_state_machine::{
|
||||
Backend as StateBackend, ChangesTrieState, InMemoryBackend, OverlayedChanges, StorageProof,
|
||||
Backend as StateBackend, InMemoryBackend, OverlayedChanges, StorageProof,
|
||||
};
|
||||
#[cfg(feature = "std")]
|
||||
use sp_std::result;
|
||||
@@ -394,14 +394,12 @@ pub type ProofRecorder<B> = sp_state_machine::ProofRecorder<<B as BlockT>::Hash>
|
||||
pub type StorageTransactionCache<Block, Backend> = sp_state_machine::StorageTransactionCache<
|
||||
<Backend as StateBackend<HashFor<Block>>>::Transaction,
|
||||
HashFor<Block>,
|
||||
NumberFor<Block>,
|
||||
>;
|
||||
|
||||
#[cfg(feature = "std")]
|
||||
pub type StorageChanges<SBackend, Block> = sp_state_machine::StorageChanges<
|
||||
<SBackend as StateBackend<HashFor<Block>>>::Transaction,
|
||||
HashFor<Block>,
|
||||
NumberFor<Block>,
|
||||
>;
|
||||
|
||||
/// Extract the state backend type for a type that implements `ProvideRuntimeApi`.
|
||||
@@ -514,7 +512,6 @@ pub trait ApiExt<Block: BlockT> {
|
||||
fn into_storage_changes(
|
||||
&self,
|
||||
backend: &Self::StateBackend,
|
||||
changes_trie_state: Option<&ChangesTrieState<HashFor<Block>, NumberFor<Block>>>,
|
||||
parent_hash: Block::Hash,
|
||||
) -> Result<StorageChanges<Self::StateBackend, Block>, String>
|
||||
where
|
||||
|
||||
@@ -211,7 +211,7 @@ fn record_proof_works() {
|
||||
None,
|
||||
8,
|
||||
);
|
||||
execution_proof_check_on_trie_backend::<_, u64, _, _>(
|
||||
execution_proof_check_on_trie_backend(
|
||||
&backend,
|
||||
&mut overlay,
|
||||
&executor,
|
||||
|
||||
Reference in New Issue
Block a user