mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-14 00:31:07 +00:00
This reverts commit ea1eb4e57f.
This commit is contained in:
@@ -32,8 +32,9 @@ use rpc::{
|
||||
futures::{stream, Future, Sink, Stream},
|
||||
};
|
||||
|
||||
use sc_rpc_api::Subscriptions;
|
||||
use sc_client_api::{BlockchainEvents, light::{Fetcher, RemoteBlockchain}};
|
||||
use jsonrpc_pubsub::{typed::Subscriber, SubscriptionId, manager::SubscriptionManager};
|
||||
use jsonrpc_pubsub::{typed::Subscriber, SubscriptionId};
|
||||
use sp_rpc::{number::NumberOrHex, list::ListOrValue};
|
||||
use sp_runtime::{
|
||||
generic::{BlockId, SignedBlock},
|
||||
@@ -56,7 +57,7 @@ trait ChainBackend<Client, Block: BlockT>: Send + Sync + 'static
|
||||
fn client(&self) -> &Arc<Client>;
|
||||
|
||||
/// Get subscriptions reference.
|
||||
fn subscriptions(&self) -> &SubscriptionManager;
|
||||
fn subscriptions(&self) -> &Subscriptions;
|
||||
|
||||
/// Tries to unwrap passed block hash, or uses best block hash otherwise.
|
||||
fn unwrap_or_best(&self, hash: Option<Block::Hash>) -> Block::Hash {
|
||||
@@ -176,7 +177,7 @@ trait ChainBackend<Client, Block: BlockT>: Send + Sync + 'static
|
||||
/// Create new state API that works on full node.
|
||||
pub fn new_full<Block: BlockT, Client>(
|
||||
client: Arc<Client>,
|
||||
subscriptions: SubscriptionManager,
|
||||
subscriptions: Subscriptions,
|
||||
) -> Chain<Block, Client>
|
||||
where
|
||||
Block: BlockT + 'static,
|
||||
@@ -190,7 +191,7 @@ pub fn new_full<Block: BlockT, Client>(
|
||||
/// Create new state API that works on light node.
|
||||
pub fn new_light<Block: BlockT, Client, F: Fetcher<Block>>(
|
||||
client: Arc<Client>,
|
||||
subscriptions: SubscriptionManager,
|
||||
subscriptions: Subscriptions,
|
||||
remote_blockchain: Arc<dyn RemoteBlockchain<Block>>,
|
||||
fetcher: Arc<F>,
|
||||
) -> Chain<Block, Client>
|
||||
@@ -278,7 +279,7 @@ impl<Block, Client> ChainApi<NumberFor<Block>, Block::Hash, Block::Header, Signe
|
||||
/// Subscribe to new headers.
|
||||
fn subscribe_headers<Block, Client, F, G, S, ERR>(
|
||||
client: &Arc<Client>,
|
||||
subscriptions: &SubscriptionManager,
|
||||
subscriptions: &Subscriptions,
|
||||
subscriber: Subscriber<Block::Header>,
|
||||
best_block_hash: G,
|
||||
stream: F,
|
||||
|
||||
Reference in New Issue
Block a user