mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-11 21:11:07 +00:00
consensus: remove caching functionality from block import pipeline (#13551)
* consensus: remove caching functionality from block import pipeline * client: update docs on Verifier::verify * node: fix block production benchmark
This commit is contained in:
@@ -18,12 +18,10 @@
|
||||
|
||||
//! Substrate Client data backend
|
||||
|
||||
use crate::{
|
||||
blockchain::{well_known_cache_keys, Backend as BlockchainBackend},
|
||||
UsageInfo,
|
||||
};
|
||||
use std::collections::HashSet;
|
||||
|
||||
use parking_lot::RwLock;
|
||||
use sp_blockchain;
|
||||
|
||||
use sp_consensus::BlockOrigin;
|
||||
use sp_core::offchain::OffchainStorage;
|
||||
use sp_runtime::{
|
||||
@@ -35,7 +33,8 @@ use sp_state_machine::{
|
||||
OffchainChangesCollection, StorageCollection, StorageIterator,
|
||||
};
|
||||
use sp_storage::{ChildInfo, StorageData, StorageKey};
|
||||
use std::collections::{HashMap, HashSet};
|
||||
|
||||
use crate::{blockchain::Backend as BlockchainBackend, UsageInfo};
|
||||
|
||||
pub use sp_state_machine::{Backend as StateBackend, KeyValueStates};
|
||||
|
||||
@@ -179,9 +178,6 @@ pub trait BlockImportOperation<Block: BlockT> {
|
||||
state: NewBlockState,
|
||||
) -> sp_blockchain::Result<()>;
|
||||
|
||||
/// Update cached data.
|
||||
fn update_cache(&mut self, cache: HashMap<well_known_cache_keys::Id, Vec<u8>>);
|
||||
|
||||
/// Inject storage data into the database.
|
||||
fn update_db_storage(
|
||||
&mut self,
|
||||
|
||||
@@ -40,7 +40,7 @@ use std::{
|
||||
|
||||
use crate::{
|
||||
backend::{self, NewBlockState},
|
||||
blockchain::{self, well_known_cache_keys::Id as CacheKeyId, BlockStatus, HeaderBackend},
|
||||
blockchain::{self, BlockStatus, HeaderBackend},
|
||||
leaves::LeafSet,
|
||||
UsageInfo,
|
||||
};
|
||||
@@ -549,8 +549,6 @@ where
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn update_cache(&mut self, _cache: HashMap<CacheKeyId, Vec<u8>>) {}
|
||||
|
||||
fn update_db_storage(
|
||||
&mut self,
|
||||
update: <InMemoryBackend<HashFor<Block>> as StateBackend<HashFor<Block>>>::Transaction,
|
||||
|
||||
Reference in New Issue
Block a user