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 panic when peer doesn't have block #1303

Merged
merged 2 commits into from
Nov 5, 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
8 changes: 4 additions & 4 deletions light-base/src/sync_service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -358,8 +358,8 @@ impl<TPlat: PlatformRef> SyncService<TPlat> {
)
.await
{
Ok(b) => b,
Err(_) => continue,
Ok(b) if !b.is_empty() => b,
Ok(_) | Err(_) => continue,
};

return Ok(result.remove(0));
Expand Down Expand Up @@ -404,8 +404,8 @@ impl<TPlat: PlatformRef> SyncService<TPlat> {
)
.await
{
Ok(b) => b,
Err(_) => continue,
Ok(b) if !b.is_empty() => b,
Ok(_) | Err(_) => continue,
};

return Ok(result.remove(0));
Expand Down
4 changes: 4 additions & 0 deletions wasm-node/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## Unreleased

### Fixed

- Fix panic when requesting a block with a specific hash from the peer-to-peer network and none of the peers has the block. ([#1303](https://github.com/smol-dot/smoldot/pull/1303))

## 2.0.7 - 2023-11-02

### Changed
Expand Down
Loading