mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-14 04:01:10 +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:
@@ -19,7 +19,6 @@
|
||||
//! Substrate blockchain API.
|
||||
|
||||
mod chain_full;
|
||||
mod chain_light;
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests;
|
||||
@@ -33,10 +32,7 @@ use rpc::{
|
||||
use std::sync::Arc;
|
||||
|
||||
use jsonrpc_pubsub::{manager::SubscriptionManager, typed::Subscriber, SubscriptionId};
|
||||
use sc_client_api::{
|
||||
light::{Fetcher, RemoteBlockchain},
|
||||
BlockchainEvents,
|
||||
};
|
||||
use sc_client_api::BlockchainEvents;
|
||||
use sp_rpc::{list::ListOrValue, number::NumberOrHex};
|
||||
use sp_runtime::{
|
||||
generic::{BlockId, SignedBlock},
|
||||
@@ -204,29 +200,6 @@ where
|
||||
Chain { backend: Box::new(self::chain_full::FullChain::new(client, subscriptions)) }
|
||||
}
|
||||
|
||||
/// Create new state API that works on light node.
|
||||
pub fn new_light<Block: BlockT, Client, F: Fetcher<Block>>(
|
||||
client: Arc<Client>,
|
||||
subscriptions: SubscriptionManager,
|
||||
remote_blockchain: Arc<dyn RemoteBlockchain<Block>>,
|
||||
fetcher: Arc<F>,
|
||||
) -> Chain<Block, Client>
|
||||
where
|
||||
Block: BlockT + 'static,
|
||||
Block::Header: Unpin,
|
||||
Client: BlockBackend<Block> + HeaderBackend<Block> + BlockchainEvents<Block> + 'static,
|
||||
F: Send + Sync + 'static,
|
||||
{
|
||||
Chain {
|
||||
backend: Box::new(self::chain_light::LightChain::new(
|
||||
client,
|
||||
subscriptions,
|
||||
remote_blockchain,
|
||||
fetcher,
|
||||
)),
|
||||
}
|
||||
}
|
||||
|
||||
/// Chain API with subscriptions support.
|
||||
pub struct Chain<Block: BlockT, Client> {
|
||||
backend: Box<dyn ChainBackend<Client, Block>>,
|
||||
|
||||
Reference in New Issue
Block a user