mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-28 23:47:56 +00:00
Transition the transaction-pool to new futures (#3394)
* Transition the transaction-pool to new futures * Fix tests * Fix tests again?!
This commit is contained in:
committed by
Gavin Wood
parent
9d6118279e
commit
11da397db8
@@ -25,8 +25,9 @@ mod tests;
|
||||
use std::{sync::Arc, convert::TryInto};
|
||||
|
||||
use client::{self, Client};
|
||||
use crate::rpc::futures::{Sink, Stream, Future};
|
||||
use crate::rpc::futures::{Sink, Future};
|
||||
use crate::subscriptions::Subscriptions;
|
||||
use futures03::{StreamExt as _, compat::Compat};
|
||||
use jsonrpc_derive::rpc;
|
||||
use jsonrpc_pubsub::{typed::Subscriber, SubscriptionId};
|
||||
use log::warn;
|
||||
@@ -249,7 +250,7 @@ impl<B, E, P, RA> AuthorApi<ExHash<P>, BlockHash<P>> for Author<B, E, P, RA> whe
|
||||
self.subscriptions.add(subscriber, move |sink| {
|
||||
sink
|
||||
.sink_map_err(|e| warn!("Error sending notifications: {:?}", e))
|
||||
.send_all(watcher.into_stream().map(Ok))
|
||||
.send_all(Compat::new(watcher.into_stream().map(|v| Ok::<_, ()>(Ok(v)))))
|
||||
.map(|_| ())
|
||||
})
|
||||
}
|
||||
|
||||
@@ -23,6 +23,7 @@ use transaction_pool::{
|
||||
txpool::Pool,
|
||||
ChainApi,
|
||||
};
|
||||
use futures::Stream;
|
||||
use primitives::{
|
||||
H256, blake2_256, hexdisplay::HexDisplay, traits::BareCryptoStore, testing::KeyStore,
|
||||
ed25519, crypto::key_types,
|
||||
|
||||
Reference in New Issue
Block a user