Skip to content

Commit

Permalink
Remove version field from struct returned by rpc_methods (#2756)
Browse files Browse the repository at this point in the history
Mimics the change done here:
paritytech/substrate#12261

Let's merge this PR only if
paritytech/substrate#12261 is approved and
merged.
  • Loading branch information
tomaka committed Sep 23, 2022
1 parent b5a823d commit 3b8bfb4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
1 change: 0 additions & 1 deletion bin/light-base/src/json_rpc_service/getters.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@ impl<TPlat: Platform> Background<TPlat> {
.respond(
state_machine_request_id,
methods::Response::rpc_methods(methods::RpcMethods {
version: 1,
methods: methods::MethodCall::method_names()
.map(|n| n.into())
.collect(),
Expand Down
6 changes: 5 additions & 1 deletion bin/wasm-node/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## Unreleased

### Changed

- Removed the `version` field of the struct returned by the `rpc_methods` function. This is technically a breaking change, but it has been introduced in a minor version bump because it is very insubstantial. ([#2756](https://github.com/paritytech/smoldot/pull/2756))

## 0.6.34 - 2022-09-20

### Added
Expand All @@ -11,7 +15,7 @@

### Changed

- No longer try to connect to a peer for 20 seconds after failing to connect to it. This prevents loops where we keep trying to connect to the same address(es) over and over again ([#2747](https://github.com/paritytech/smoldot/pull/2747)).
- No longer try to connect to a peer for 20 seconds after failing to connect to it. This prevents loops where we keep trying to connect to the same address(es) over and over again. ([#2747](https://github.com/paritytech/smoldot/pull/2747))

### Fixed

Expand Down
3 changes: 0 additions & 3 deletions src/json_rpc/methods.rs
Original file line number Diff line number Diff line change
Expand Up @@ -889,7 +889,6 @@ pub struct NetworkConfig {

#[derive(Debug, Clone)]
pub struct RpcMethods {
pub version: u64,
pub methods: Vec<String>,
}

Expand Down Expand Up @@ -1054,12 +1053,10 @@ impl serde::Serialize for RpcMethods {
{
#[derive(serde::Serialize)]
struct SerdeRpcMethods<'a> {
version: u64,
methods: &'a [String],
}

SerdeRpcMethods {
version: self.version,
methods: &self.methods,
}
.serialize(serializer)
Expand Down

0 comments on commit 3b8bfb4

Please sign in to comment.