mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-14 15:41:02 +00:00
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: Alexandru Vasile <alexandru.vasile@parity.io>
This commit is contained in:
@@ -0,0 +1,8 @@
|
|||||||
|
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> {
|
|||||||
///
|
///
|
||||||
/// 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() {
|
|||||||
|
|
||||||
// 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() {
|
|||||||
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() {
|
|||||||
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();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user