Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stabilize transactionWatch_unstable JSON-RPC functions #1771

Merged
merged 2 commits into from
Apr 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions lib/src/json_rpc/methods.rs
Original file line number Diff line number Diff line change
Expand Up @@ -501,8 +501,8 @@ define_methods! {
transaction_v1_broadcast(transaction: HexString) -> Cow<'a, str>,
transaction_v1_stop(#[rename = "operationId"] operation_id: Cow<'a, str>) -> (),

transactionWatch_unstable_submitAndWatch(transaction: HexString) -> Cow<'a, str>,
transactionWatch_unstable_unwatch(subscription: Cow<'a, str>) -> (),
transactionWatch_v1_submitAndWatch(transaction: HexString) -> Cow<'a, str>,
transactionWatch_v1_unwatch(subscription: Cow<'a, str>) -> (),

// These functions are a custom addition in smoldot. As of the writing of this comment, there
// is no plan to standardize them. See <https://github.com/paritytech/smoldot/issues/2245> and
Expand All @@ -524,7 +524,7 @@ define_methods! {

// The functions below are experimental and are defined in the document https://github.com/paritytech/json-rpc-interface-spec/
chainHead_v1_followEvent(subscription: Cow<'a, str>, result: FollowEvent<'a>) -> (),
transactionWatch_unstable_watchEvent(subscription: Cow<'a, str>, result: TransactionWatchEvent<'a>) -> (),
transactionWatch_v1_watchEvent(subscription: Cow<'a, str>, result: TransactionWatchEvent<'a>) -> (),

// This function is a custom addition in smoldot. As of the writing of this comment, there is
// no plan to standardize it. See https://github.com/paritytech/smoldot/issues/2245.
Expand Down
14 changes: 7 additions & 7 deletions lib/src/json_rpc/service/client_main_task.rs
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,7 @@ impl ClientMainTask {
| methods::MethodCall::state_subscribeRuntimeVersion { .. }
| methods::MethodCall::state_subscribeStorage { .. }
| methods::MethodCall::transaction_v1_broadcast { .. }
| methods::MethodCall::transactionWatch_unstable_submitAndWatch { .. }
| methods::MethodCall::transactionWatch_v1_submitAndWatch { .. }
| methods::MethodCall::sudo_network_unstable_watch { .. }
| methods::MethodCall::chainHead_v1_follow { .. } => {
// Subscription starting requests.
Expand Down Expand Up @@ -541,7 +541,7 @@ impl ClientMainTask {
| methods::MethodCall::transaction_v1_stop {
operation_id: subscription,
}
| methods::MethodCall::transactionWatch_unstable_unwatch { subscription, .. }
| methods::MethodCall::transactionWatch_v1_unwatch { subscription, .. }
| methods::MethodCall::sudo_network_unstable_unwatch { subscription, .. }
| methods::MethodCall::chainHead_v1_unfollow {
follow_subscription: subscription,
Expand All @@ -567,9 +567,9 @@ impl ClientMainTask {
methods::MethodCall::transaction_v1_stop { .. } => {
methods::Response::transaction_v1_stop(())
}
methods::MethodCall::transactionWatch_unstable_unwatch {
..
} => methods::Response::transactionWatch_unstable_unwatch(()),
methods::MethodCall::transactionWatch_v1_unwatch { .. } => {
methods::Response::transactionWatch_v1_unwatch(())
}
methods::MethodCall::sudo_network_unstable_unwatch {
..
} => methods::Response::sudo_network_unstable_unwatch(()),
Expand Down Expand Up @@ -1160,8 +1160,8 @@ impl SubscriptionStartProcess {
methods::MethodCall::state_subscribeStorage { .. } => {
methods::Response::state_subscribeStorage(Cow::Borrowed(&self.subscription_id))
}
methods::MethodCall::transactionWatch_unstable_submitAndWatch { .. } => {
methods::Response::transactionWatch_unstable_submitAndWatch(Cow::Borrowed(
methods::MethodCall::transactionWatch_v1_submitAndWatch { .. } => {
methods::Response::transactionWatch_v1_submitAndWatch(Cow::Borrowed(
&self.subscription_id,
))
}
Expand Down
Loading
Loading