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

Fix chainHead_follow error code #1392

Merged
merged 2 commits into from
Nov 22, 2023
Merged
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion lib/src/json_rpc/parse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ pub fn build_error_response(
(SerdeErrorCode::ServerError(n), msg)
}
ErrorResponse::ApplicationDefined(n, msg) => {
assert!(!(-32700..=-32000).contains(&n));
assert!(!(-32768..=-32000).contains(&n));
(SerdeErrorCode::MethodError(n), msg)
}
};
Expand Down
2 changes: 1 addition & 1 deletion light-base/src/json_rpc_service/background/chain_head.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ impl<TPlat: PlatformRef> Background<TPlat> {
"Rejected `chainHead_unstable_follow` subscription due to limit reached."
);
request.fail(json_rpc::parse::ErrorResponse::ApplicationDefined(
-32100,
-32800,
"Maximum number of `chainHead_unstable_follow` subscriptions reached",
));
return;
Expand Down
1 change: 1 addition & 0 deletions wasm-node/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

- Fix panic when the runtime of a chain provides consensus information that is inconsistent with the information found in the finalized block. ([#1317](https://github.com/smol-dot/smoldot/pull/1317))
- Incoming notification substreams are now properly when accepted when a peer doesn't have a slot or gets a slot later on. ([#1369](https://github.com/smol-dot/smoldot/pull/1369))
- Fix panic when `chainHead_unstable_follow` is called too many times. ([#1392](https://github.com/smol-dot/smoldot/pull/1392))

## 2.0.10 - 2023-11-17

Expand Down
Loading