Skip to content

Commit

Permalink
Fix chainHead_follow error code
Browse files Browse the repository at this point in the history
  • Loading branch information
tomaka committed Nov 22, 2023
1 parent 0232234 commit 032ac67
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
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.

## 2.0.10 - 2023-11-17

Expand Down

0 comments on commit 032ac67

Please sign in to comment.