From 62bc10c841d6816ce5c3e0422e18e9422e0ce952 Mon Sep 17 00:00:00 2001 From: Roman Krasiuk Date: Tue, 17 Sep 2024 18:05:42 +0200 Subject: [PATCH] fix(engine): state retrieval for parallel root with persisted parent --- crates/engine/tree/src/tree/mod.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/crates/engine/tree/src/tree/mod.rs b/crates/engine/tree/src/tree/mod.rs index ef7ce66c7b34..536e4a1d2d68 100644 --- a/crates/engine/tree/src/tree/mod.rs +++ b/crates/engine/tree/src/tree/mod.rs @@ -2274,6 +2274,10 @@ where for block in blocks.iter().rev() { input.append_cached_ref(block.trie_updates(), block.hashed_state()) } + } else { + // The block attaches to canonical persisted parent. + let revert_state = consistent_view.revert_state(parent_hash)?; + input.append(revert_state); } // Extend with block we are validating root for.