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 network_service discarding events #967

Merged
merged 2 commits into from
Jul 26, 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
9 changes: 5 additions & 4 deletions light-base/src/network_service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -988,10 +988,11 @@ async fn background_task<TPlat: PlatformRef>(mut task: BackgroundTask<TPlat>) {
async { WhatHappened::Message(task.messages_rx.next().await.unwrap()) };
let can_generate_event = matches!(task.event_senders, either::Left(_));
let service_event = async {
if let (true, Some(event)) = (
can_generate_event,
task.network.next_event(task.platform.now()),
) {
if let Some(event) = if can_generate_event {
task.network.next_event(task.platform.now())
} else {
None
} {
WhatHappened::NetworkEvent(event)
} else if let Some(start_connect) =
task.network.next_start_connect(|| task.platform.now())
Expand Down
4 changes: 4 additions & 0 deletions wasm-node/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
- A JSON-RPC error is now returned if the JSON-RPC client tries to open more than two simultaneous `chainHead_unstable_follow` subscriptions, in accordance with the latest changes in the JSON-RPC API specification. ([#962](https://github.com/smol-dot/smoldot/pull/962))
- Rename `chainHead_unstable_storageContinue` to `chainHead_unstable_continue`, in accordance with the latest changes in the JSON-RPC API specification. ([#965](https://github.com/smol-dot/smoldot/pull/965))

### Fixed

- Fix several potential panics due to mismatches in the state of the networking. ([#967](https://github.com/smol-dot/smoldot/pull/967))

## 1.0.13 - 2023-07-16

### Added
Expand Down