mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-22 04:25:42 +00:00
Companion – Update jsonrpsee to 0.4.1 (#4256)
* Update staking-miner * fmt * lockfile * Point to substrate companion branch * Revert "Point to substrate companion branch" This reverts commit 3f8afc5d3137614776f54c7dac3c9077268c5fe5. * Revert 3f8afc5d3137614776f54c7dac3c9077268c5fe5 * Remove `params` macro in favour of `rpc_macro` from jsonrpsee * update Cargo.lock * remove unused import Co-authored-by: Andronik Ordian <write@reusable.software>
This commit is contained in:
@@ -16,14 +16,14 @@
|
||||
|
||||
//! The monitor command.
|
||||
|
||||
use crate::{
|
||||
params, prelude::*, rpc_helpers::*, signer::Signer, Error, MonitorConfig, SharedConfig,
|
||||
};
|
||||
use crate::{prelude::*, rpc_helpers::*, signer::Signer, Error, MonitorConfig, SharedConfig};
|
||||
use codec::Encode;
|
||||
use jsonrpsee_ws_client::{
|
||||
use jsonrpsee::{
|
||||
rpc_params,
|
||||
types::{traits::SubscriptionClient, Subscription},
|
||||
WsClient,
|
||||
ws_client::WsClient,
|
||||
};
|
||||
|
||||
use sc_transaction_pool_api::TransactionStatus;
|
||||
use sp_core::storage::StorageKey;
|
||||
|
||||
@@ -33,7 +33,7 @@ async fn ensure_signed_phase<T: EPM::Config, B: BlockT>(
|
||||
at: B::Hash,
|
||||
) -> Result<(), Error<T>> {
|
||||
let key = StorageKey(EPM::CurrentPhase::<T>::hashed_key().to_vec());
|
||||
let phase = get_storage::<EPM::Phase<BlockNumber>>(client, params! {key, at})
|
||||
let phase = get_storage::<EPM::Phase<BlockNumber>>(client, rpc_params! {key, at})
|
||||
.await
|
||||
.map_err::<Error<T>, _>(Into::into)?
|
||||
.unwrap_or_default();
|
||||
@@ -82,7 +82,7 @@ macro_rules! monitor_cmd_for { ($runtime:tt) => { paste::paste! {
|
||||
loop {
|
||||
log::info!(target: LOG_TARGET, "subscribing to {:?} / {:?}", sub, unsub);
|
||||
let mut subscription: Subscription<Header> = client
|
||||
.subscribe(&sub, params! {}, &unsub)
|
||||
.subscribe(&sub, None, &unsub)
|
||||
.await
|
||||
.unwrap();
|
||||
|
||||
@@ -134,7 +134,7 @@ macro_rules! monitor_cmd_for { ($runtime:tt) => { paste::paste! {
|
||||
let mut tx_subscription: Subscription<
|
||||
TransactionStatus<<Block as BlockT>::Hash, <Block as BlockT>::Hash>
|
||||
> = match client
|
||||
.subscribe(&"author_submitAndWatchExtrinsic", params! { bytes }, "author_unwatchExtrinsic")
|
||||
.subscribe(&"author_submitAndWatchExtrinsic", rpc_params! { bytes }, "author_unwatchExtrinsic")
|
||||
.await
|
||||
{
|
||||
Ok(sub) => sub,
|
||||
@@ -159,7 +159,7 @@ macro_rules! monitor_cmd_for { ($runtime:tt) => { paste::paste! {
|
||||
log::info!(target: LOG_TARGET, "included at {:?}", hash);
|
||||
let key = StorageKey(frame_support::storage::storage_prefix(b"System",b"Events").to_vec());
|
||||
let events = get_storage::<Vec<frame_system::EventRecord<Event, <Block as BlockT>::Hash>>,
|
||||
>(client, params!{ key, hash }).await?.unwrap_or_default();
|
||||
>(client, rpc_params!{ key, hash }).await?.unwrap_or_default();
|
||||
log::info!(target: LOG_TARGET, "events at inclusion {:?}", events);
|
||||
}
|
||||
TransactionStatus::Retracted(hash) => {
|
||||
|
||||
Reference in New Issue
Block a user