Skip to content
Snippets Groups Projects
Unverified Commit eba3deca authored by Alexandru Vasile's avatar Alexandru Vasile Committed by GitHub
Browse files

txWatch: Stabilize txWatch to version 1 (#4171)


This PR stabilizes the txBroadcast API to version 1.

Needs from spec:
- https://github.com/paritytech/json-rpc-interface-spec/pull/153 
- https://github.com/paritytech/json-rpc-interface-spec/pull/154


cc @paritytech/subxt-team

---------

Signed-off-by: default avatarAlexandru Vasile <alexandru.vasile@parity.io>
parent 148d942e
No related merge requests found
Pipeline #467269 failed with stages
in 57 minutes and 43 seconds
title: Stabilize transactionWatch RPC class to version 1
doc:
- audience: Node Dev
description: |
The transactionWatch RPC API is stabilized to version 1.
crates: [ ]
...@@ -33,8 +33,8 @@ pub trait TransactionApi<Hash: Clone> { ...@@ -33,8 +33,8 @@ pub trait TransactionApi<Hash: Clone> {
/// ///
/// This method is unstable and subject to change in the future. /// This method is unstable and subject to change in the future.
#[subscription( #[subscription(
name = "transactionWatch_unstable_submitAndWatch" => "transactionWatch_unstable_watchEvent", name = "transactionWatch_v1_submitAndWatch" => "transactionWatch_v1_watchEvent",
unsubscribe = "transactionWatch_unstable_unwatch", unsubscribe = "transactionWatch_v1_unwatch",
item = TransactionEvent<Hash>, item = TransactionEvent<Hash>,
)] )]
fn submit_and_watch(&self, bytes: Bytes); fn submit_and_watch(&self, bytes: Bytes);
......
...@@ -38,7 +38,7 @@ async fn tx_invalid_bytes() { ...@@ -38,7 +38,7 @@ async fn tx_invalid_bytes() {
// This should not rely on the tx pool state. // This should not rely on the tx pool state.
let mut sub = tx_api let mut sub = tx_api
.subscribe_unbounded("transactionWatch_unstable_submitAndWatch", rpc_params![&"0xdeadbeef"]) .subscribe_unbounded("transactionWatch_v1_submitAndWatch", rpc_params![&"0xdeadbeef"])
.await .await
.unwrap(); .unwrap();
...@@ -56,7 +56,7 @@ async fn tx_in_finalized() { ...@@ -56,7 +56,7 @@ async fn tx_in_finalized() {
let xt = hex_string(&uxt.encode()); let xt = hex_string(&uxt.encode());
let mut sub = tx_api let mut sub = tx_api
.subscribe_unbounded("transactionWatch_unstable_submitAndWatch", rpc_params![&xt]) .subscribe_unbounded("transactionWatch_v1_submitAndWatch", rpc_params![&xt])
.await .await
.unwrap(); .unwrap();
...@@ -95,7 +95,7 @@ async fn tx_with_pruned_best_block() { ...@@ -95,7 +95,7 @@ async fn tx_with_pruned_best_block() {
let xt = hex_string(&uxt.encode()); let xt = hex_string(&uxt.encode());
let mut sub = tx_api let mut sub = tx_api
.subscribe_unbounded("transactionWatch_unstable_submitAndWatch", rpc_params![&xt]) .subscribe_unbounded("transactionWatch_v1_submitAndWatch", rpc_params![&xt])
.await .await
.unwrap(); .unwrap();
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment