From 738f657358aa8dc321938e3c85b0c6d7828dc2f2 Mon Sep 17 00:00:00 2001 From: Pierre Krieger Date: Wed, 17 Jul 2024 09:22:52 +0200 Subject: [PATCH 1/2] Fix state mismatch in async_tree.rs --- lib/src/chain/async_tree.rs | 4 +++- wasm-node/CHANGELOG.md | 4 ++++ 2 files changed, 7 insertions(+), 1 deletion(-) 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..c4fde2f3f6 100644 --- a/wasm-node/CHANGELOG.md +++ b/wasm-node/CHANGELOG.md @@ -2,6 +2,10 @@ ## Unreleased +### Fixed + +- Fix potential panic in parachain syncing code. + ## 2.0.29 - 2024-06-17 ### Fixed From f2f99b937ca4db7457a5a4aa9da188c570f69847 Mon Sep 17 00:00:00 2001 From: Pierre Krieger Date: Wed, 17 Jul 2024 09:23:54 +0200 Subject: [PATCH 2/2] PR link --- wasm-node/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wasm-node/CHANGELOG.md b/wasm-node/CHANGELOG.md index c4fde2f3f6..aee3a8d193 100644 --- a/wasm-node/CHANGELOG.md +++ b/wasm-node/CHANGELOG.md @@ -4,7 +4,7 @@ ### Fixed -- Fix potential panic in parachain syncing code. +- Fix potential panic in parachain syncing code. ([#1912](https://github.com/smol-dot/smoldot/pull/1912)) ## 2.0.29 - 2024-06-17