Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove version field from struct returned by rpc_methods #2756

Merged
merged 4 commits into from
Sep 23, 2022
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
1 change: 1 addition & 0 deletions bin/wasm-node/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,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)).
- 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))

### Added

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