diff --git a/bin/light-base/src/json_rpc_service.rs b/bin/light-base/src/json_rpc_service.rs index eb09bd3eb1..8a02ee799e 100644 --- a/bin/light-base/src/json_rpc_service.rs +++ b/bin/light-base/src/json_rpc_service.rs @@ -1105,7 +1105,7 @@ impl Background { follow_subscription, hash, key, - child_key, + child_trie, network_config, } => { self.chain_head_storage( @@ -1114,7 +1114,7 @@ impl Background { &*follow_subscription, hash, key, - child_key, + child_trie, network_config, ) .await; diff --git a/bin/light-base/src/json_rpc_service/chain_head.rs b/bin/light-base/src/json_rpc_service/chain_head.rs index 8f577f3eca..6f31ede9c5 100644 --- a/bin/light-base/src/json_rpc_service/chain_head.rs +++ b/bin/light-base/src/json_rpc_service/chain_head.rs @@ -863,7 +863,7 @@ impl Background { follow_subscription: &str, hash: methods::HashHexString, key: methods::HexString, - child_key: Option, + child_trie: Option, network_config: Option, ) { let network_config = network_config.unwrap_or(methods::NetworkConfig { @@ -872,7 +872,8 @@ impl Background { total_attempts: 3, }); - if child_key.is_some() { + if child_trie.is_some() { + // TODO: implement this self.requests_subscriptions .respond( &state_machine_request_id, @@ -880,7 +881,7 @@ impl Background { request_id, json_rpc::parse::ErrorResponse::ServerError( -32000, - "Child key storage queries not supported yet", + "Child trie storage queries not supported yet", ), None, ), @@ -888,7 +889,7 @@ impl Background { .await; log::warn!( target: &self.log_target, - "chainHead_unstable_storage with a non-null childKey has been called. \ + "chainHead_unstable_storage with a non-null childTrie has been called. \ This isn't supported by smoldot yet." ); return; diff --git a/bin/wasm-node/CHANGELOG.md b/bin/wasm-node/CHANGELOG.md index 65e0f49e70..9e28427454 100644 --- a/bin/wasm-node/CHANGELOG.md +++ b/bin/wasm-node/CHANGELOG.md @@ -2,6 +2,10 @@ ## Unreleased +### Changed + +- The `childKey` parameter of the `chainHead_unstable_storage` JSON-RPC function has been renamed to `childTrie` in accordance to the latest specification changes. ([#2994](https://github.com/paritytech/smoldot/pull/2994)) + ## 0.7.6 - 2022-11-04 ### Fixed diff --git a/src/json_rpc/methods.rs b/src/json_rpc/methods.rs index 63be322252..529e60ae51 100644 --- a/src/json_rpc/methods.rs +++ b/src/json_rpc/methods.rs @@ -434,7 +434,7 @@ define_methods! { #[rename = "followSubscription"] follow_subscription: Cow<'a, str>, hash: HashHexString, key: HexString, - #[rename = "childKey"] child_key: Option, + #[rename = "childTrie"] child_trie: Option, #[rename = "networkConfig"] network_config: Option ) -> Cow<'a, str>, chainHead_unstable_unfollow(