From 5d88b888c76da40ac27a9c481598dad5cb5f2eac Mon Sep 17 00:00:00 2001 From: Sebastian Kunert Date: Fri, 24 Feb 2023 14:04:33 +0100 Subject: [PATCH 1/2] Adjust naming of `allHead` notifications --- bin/light-base/src/json_rpc_service/state_chain.rs | 2 +- src/json_rpc/methods.rs | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/light-base/src/json_rpc_service/state_chain.rs b/bin/light-base/src/json_rpc_service/state_chain.rs index 50ada998fa..0a4347a308 100644 --- a/bin/light-base/src/json_rpc_service/state_chain.rs +++ b/bin/light-base/src/json_rpc_service/state_chain.rs @@ -490,7 +490,7 @@ impl Background { .requests_subscriptions .try_push_notification( &state_machine_subscription, - methods::ServerToClient::chain_newHead { + methods::ServerToClient::chain_allHead { subscription: (&subscription_id).into(), result: header, } diff --git a/src/json_rpc/methods.rs b/src/json_rpc/methods.rs index 3730308e43..d6d5284108 100644 --- a/src/json_rpc/methods.rs +++ b/src/json_rpc/methods.rs @@ -503,6 +503,7 @@ define_methods! { author_extrinsicUpdate(subscription: Cow<'a, str>, result: TransactionStatus) -> (), chain_finalizedHead(subscription: Cow<'a, str>, result: Header) -> (), chain_newHead(subscription: Cow<'a, str>, result: Header) -> (), + chain_allHead(subscription: Cow<'a, str>, result: Header) -> (), state_runtimeVersion(subscription: Cow<'a, str>, result: Option>) -> (), // TODO: the Option is a custom addition state_storage(subscription: Cow<'a, str>, result: StorageChangeSet) -> (), From 5cb757b6cc08d4b21a0d89751719a2d1ac6869d7 Mon Sep 17 00:00:00 2001 From: Pierre Krieger Date: Fri, 24 Feb 2023 14:51:38 +0100 Subject: [PATCH 2/2] CHANGELOG entry --- wasm-node/CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/wasm-node/CHANGELOG.md b/wasm-node/CHANGELOG.md index 0262329b9b..d65197260e 100644 --- a/wasm-node/CHANGELOG.md +++ b/wasm-node/CHANGELOG.md @@ -5,6 +5,7 @@ ## Fixed - Fix panic when the input data of a Wasm function call is larger than a Wasm page. ([#218](https://github.com/smol-dot/smoldot/pull/218)) +- Subscriptions to the `chain_subscribeAllHeads` JSON-RPC function now generate notifications named `chain_allHead`, like in Substrate. They were erroneously named `chain_newHead`. ([#227](https://github.com/smol-dot/smoldot/pull/227)) ## 0.7.12 - 2022-02-22