mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 07:01:05 +00:00
Upgrade jsonrpc to 0.18.0 (#9547)
* Upgrade jsonrpc to 0.18.0
I think this says all :P
* 🤦
* Fmt etc
* Fix tests
* Fix tests again...
* Better impl
* Revert "Tell dependabot to ignore jsonrpc-* updates (#9518)"
This reverts commit 6e0cd5587d.
This commit is contained in:
@@ -15,7 +15,7 @@ targets = ["x86_64-unknown-linux-gnu"]
|
||||
[dependencies]
|
||||
codec = { package = "parity-scale-codec", version = "2.0.0" }
|
||||
thiserror = "1.0.21"
|
||||
futures = { version = "0.3.1", features = ["compat"] }
|
||||
futures = "0.3.16"
|
||||
intervalier = "0.4.0"
|
||||
log = "0.4.8"
|
||||
parity-util-mem = { version = "0.10.0", default-features = false, features = ["primitive-types"] }
|
||||
|
||||
@@ -126,7 +126,7 @@ pub enum TransactionStatus<Hash, BlockHash> {
|
||||
|
||||
/// The stream of transaction events.
|
||||
pub type TransactionStatusStream<Hash, BlockHash> =
|
||||
dyn Stream<Item = TransactionStatus<Hash, BlockHash>> + Send + Unpin;
|
||||
dyn Stream<Item = TransactionStatus<Hash, BlockHash>> + Send;
|
||||
|
||||
/// The import notification event stream.
|
||||
pub type ImportNotificationStream<H> = futures::channel::mpsc::Receiver<H>;
|
||||
@@ -210,7 +210,7 @@ pub trait TransactionPool: Send + Sync {
|
||||
at: &BlockId<Self::Block>,
|
||||
source: TransactionSource,
|
||||
xt: TransactionFor<Self>,
|
||||
) -> PoolFuture<Box<TransactionStatusStreamFor<Self>>, Self::Error>;
|
||||
) -> PoolFuture<Pin<Box<TransactionStatusStreamFor<Self>>>, Self::Error>;
|
||||
|
||||
// *** Block production / Networking
|
||||
/// Get an iterator for ready transactions ordered by priority.
|
||||
|
||||
@@ -290,16 +290,16 @@ where
|
||||
at: &BlockId<Self::Block>,
|
||||
source: TransactionSource,
|
||||
xt: TransactionFor<Self>,
|
||||
) -> PoolFuture<Box<TransactionStatusStreamFor<Self>>, Self::Error> {
|
||||
) -> PoolFuture<Pin<Box<TransactionStatusStreamFor<Self>>>, Self::Error> {
|
||||
let at = *at;
|
||||
let pool = self.pool.clone();
|
||||
|
||||
self.metrics.report(|metrics| metrics.submitted_transactions.inc());
|
||||
|
||||
async move {
|
||||
pool.submit_and_watch(&at, source, xt)
|
||||
.map(|result| result.map(|watcher| Box::new(watcher.into_stream()) as _))
|
||||
.await
|
||||
let watcher = pool.submit_and_watch(&at, source, xt).await?;
|
||||
|
||||
Ok(watcher.into_stream().boxed())
|
||||
}
|
||||
.boxed()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user