diff --git a/lib/src/chain/async_tree.rs b/lib/src/chain/async_tree.rs index 7e9b2cb5f4..2c97c76f07 100644 --- a/lib/src/chain/async_tree.rs +++ b/lib/src/chain/async_tree.rs @@ -788,7 +788,9 @@ where }, ); - self.input_best_block_index = Some(new_index); + if is_new_best { + self.input_best_block_index = Some(new_index); + } new_index } diff --git a/wasm-node/CHANGELOG.md b/wasm-node/CHANGELOG.md index 9b617d30bc..aee3a8d193 100644 --- a/wasm-node/CHANGELOG.md +++ b/wasm-node/CHANGELOG.md @@ -2,6 +2,10 @@ ## Unreleased +### Fixed + +- Fix potential panic in parachain syncing code. ([#1912](https://github.com/smol-dot/smoldot/pull/1912)) + ## 2.0.29 - 2024-06-17 ### Fixed