Switch to bounded mpsc for txpool import notification stream (#6640)

* Switch to bounded mpsc for txpool import notification stream

* Update client/transaction-pool/graph/src/validated_pool.rs

Co-authored-by: Nikolay Volf <nikvolf@gmail.com>

Co-authored-by: Nikolay Volf <nikvolf@gmail.com>
This commit is contained in:
Wei Tang
2020-07-17 12:31:47 +02:00
committed by GitHub
parent 85e1f9aa8d
commit 8ae1aa4c28
6 changed files with 30 additions and 11 deletions
@@ -25,7 +25,6 @@ use std::{
};
use futures::{Future, Stream};
use serde::{Deserialize, Serialize};
use sp_utils::mpsc;
use sp_runtime::{
generic::BlockId,
traits::{Block as BlockT, Member, NumberFor},
@@ -131,7 +130,7 @@ pub enum TransactionStatus<Hash, BlockHash> {
pub type TransactionStatusStream<Hash, BlockHash> = dyn Stream<Item=TransactionStatus<Hash, BlockHash>> + Send + Unpin;
/// The import notification event stream.
pub type ImportNotificationStream<H> = mpsc::TracingUnboundedReceiver<H>;
pub type ImportNotificationStream<H> = futures::channel::mpsc::Receiver<H>;
/// Transaction hash type for a pool.
pub type TxHash<P> = <P as TransactionPool>::Hash;