Revert "Use Subscription Manager from jsonrpc-pubsub (#6208)" (#6252)

This reverts commit ea1eb4e57f.
This commit is contained in:
André Silva
2020-06-04 15:39:57 +01:00
committed by GitHub
parent 3fef099893
commit 8f5a52fe1a
31 changed files with 285 additions and 196 deletions
+5 -4
View File
@@ -32,8 +32,8 @@ use rpc::futures::{
};
use futures::{StreamExt as _, compat::Compat};
use futures::future::{ready, FutureExt, TryFutureExt};
use sc_rpc_api::DenyUnsafe;
use jsonrpc_pubsub::{typed::Subscriber, SubscriptionId, manager::SubscriptionManager};
use sc_rpc_api::{DenyUnsafe, Subscriptions};
use jsonrpc_pubsub::{typed::Subscriber, SubscriptionId};
use codec::{Encode, Decode};
use sp_core::{Bytes, traits::BareCryptoStorePtr};
use sp_api::ProvideRuntimeApi;
@@ -55,7 +55,7 @@ pub struct Author<P, Client> {
/// Transactions pool
pool: Arc<P>,
/// Subscriptions manager
subscriptions: SubscriptionManager,
subscriptions: Subscriptions,
/// The key store.
keystore: BareCryptoStorePtr,
/// Whether to deny unsafe calls
@@ -67,7 +67,7 @@ impl<P, Client> Author<P, Client> {
pub fn new(
client: Arc<Client>,
pool: Arc<P>,
subscriptions: SubscriptionManager,
subscriptions: Subscriptions,
keystore: BareCryptoStorePtr,
deny_unsafe: DenyUnsafe,
) -> Self {
@@ -81,6 +81,7 @@ impl<P, Client> Author<P, Client> {
}
}
/// Currently we treat all RPC transactions as externals.
///
/// Possibly in the future we could allow opt-in for special treatment