From 5348f1271d7a787fac168d9e62e92f1029ff42b3 Mon Sep 17 00:00:00 2001 From: Pierre Krieger Date: Tue, 6 Jun 2023 10:49:12 +0200 Subject: [PATCH 1/3] Fix mismatch between legacy and new transactions API --- light-base/src/json_rpc_service/background/transactions.rs | 4 ++-- wasm-node/CHANGELOG.md | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/light-base/src/json_rpc_service/background/transactions.rs b/light-base/src/json_rpc_service/background/transactions.rs index 377a945133..cdec52d1d0 100644 --- a/light-base/src/json_rpc_service/background/transactions.rs +++ b/light-base/src/json_rpc_service/background/transactions.rs @@ -269,7 +269,7 @@ impl Background { }; let update = match (status_update, is_legacy) { - (transactions_service::TransactionStatus::Broadcast(peers), false) => { + (transactions_service::TransactionStatus::Broadcast(peers), true) => { methods::ServerToClient::author_extrinsicUpdate { subscription: (&subscription_id).into(), result: methods::TransactionStatus::Broadcast( @@ -278,7 +278,7 @@ impl Background { } .to_json_call_object_parameters(None) } - (transactions_service::TransactionStatus::Broadcast(peers), true) => { + (transactions_service::TransactionStatus::Broadcast(peers), false) => { num_broadcasted_peers += peers.len(); methods::ServerToClient::transaction_unstable_watchEvent { subscription: (&subscription_id).into(), diff --git a/wasm-node/CHANGELOG.md b/wasm-node/CHANGELOG.md index 1486403414..a66ff2c175 100644 --- a/wasm-node/CHANGELOG.md +++ b/wasm-node/CHANGELOG.md @@ -2,6 +2,10 @@ ## Unreleased +### Fixed + +- Fix `author_submitAndWatchExtrinsic` generating `transaction_unstable_watchEvent` notifications, and `transaction_unstable_submitAndWatch` generating `author_extrinsicUpdate` notifications. + ## 1.0.8 - 2023-06-05 ### Changed From 59230123ddf482ad06b87ca2cb477223b8736b36 Mon Sep 17 00:00:00 2001 From: Pierre Krieger Date: Tue, 6 Jun 2023 10:49:39 +0200 Subject: [PATCH 2/3] PR link --- wasm-node/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wasm-node/CHANGELOG.md b/wasm-node/CHANGELOG.md index a66ff2c175..d1cc9a4bba 100644 --- a/wasm-node/CHANGELOG.md +++ b/wasm-node/CHANGELOG.md @@ -4,7 +4,7 @@ ### Fixed -- Fix `author_submitAndWatchExtrinsic` generating `transaction_unstable_watchEvent` notifications, and `transaction_unstable_submitAndWatch` generating `author_extrinsicUpdate` notifications. +- Fix `author_submitAndWatchExtrinsic` generating `transaction_unstable_watchEvent` notifications, and `transaction_unstable_submitAndWatch` generating `author_extrinsicUpdate` notifications. ([#677](https://github.com/smol-dot/smoldot/pull/677)) ## 1.0.8 - 2023-06-05 From 4fdd4df6c14e3bd2e34e6ccc6c0e9a6ad27aeebb Mon Sep 17 00:00:00 2001 From: Pierre Krieger Date: Tue, 6 Jun 2023 10:56:56 +0200 Subject: [PATCH 3/3] Add `erroneously` in CHANGELOG --- wasm-node/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wasm-node/CHANGELOG.md b/wasm-node/CHANGELOG.md index d1cc9a4bba..e5e2c17344 100644 --- a/wasm-node/CHANGELOG.md +++ b/wasm-node/CHANGELOG.md @@ -4,7 +4,7 @@ ### Fixed -- Fix `author_submitAndWatchExtrinsic` generating `transaction_unstable_watchEvent` notifications, and `transaction_unstable_submitAndWatch` generating `author_extrinsicUpdate` notifications. ([#677](https://github.com/smol-dot/smoldot/pull/677)) +- Fix `author_submitAndWatchExtrinsic` erroneously generating `transaction_unstable_watchEvent` notifications, and `transaction_unstable_submitAndWatch` erroneously generating `author_extrinsicUpdate` notifications. ([#677](https://github.com/smol-dot/smoldot/pull/677)) ## 1.0.8 - 2023-06-05