diff --git a/light-base/src/sync_service.rs b/light-base/src/sync_service.rs index 79fc75ed27..50427475f2 100644 --- a/light-base/src/sync_service.rs +++ b/light-base/src/sync_service.rs @@ -358,8 +358,8 @@ impl SyncService { ) .await { - Ok(b) => b, - Err(_) => continue, + Ok(b) if !b.is_empty() => b, + Ok(_) | Err(_) => continue, }; return Ok(result.remove(0)); @@ -404,8 +404,8 @@ impl SyncService { ) .await { - Ok(b) => b, - Err(_) => continue, + Ok(b) if !b.is_empty() => b, + Ok(_) | Err(_) => continue, }; return Ok(result.remove(0)); diff --git a/wasm-node/CHANGELOG.md b/wasm-node/CHANGELOG.md index 49ce8c92d2..a4174633d1 100644 --- a/wasm-node/CHANGELOG.md +++ b/wasm-node/CHANGELOG.md @@ -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