From 56f219fc94bb5cffb384a492584272b9b7930ef8 Mon Sep 17 00:00:00 2001 From: Roman Krasiuk Date: Thu, 23 Mar 2023 15:43:42 +0200 Subject: [PATCH] fix(execution): poststate extension (#1929) --- crates/storage/provider/src/post_state.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/crates/storage/provider/src/post_state.rs b/crates/storage/provider/src/post_state.rs index 077b5b0b5c..5378b424d2 100644 --- a/crates/storage/provider/src/post_state.rs +++ b/crates/storage/provider/src/post_state.rs @@ -269,6 +269,10 @@ impl PostState { /// Extend this [PostState] with the changes in another [PostState]. pub fn extend(&mut self, other: PostState) { + if other.changes.is_empty() { + return + } + self.changes.reserve(other.changes.len()); let mut next_transition_id = self.current_transition_id;