Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix crash while removing values from maps containing complex types #2225

Merged
merged 6 commits into from
Feb 4, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Clippy
bzawisto committed Feb 4, 2025
commit a2910e96c909991a35d2d73a7c80b0a8dd19611e
12 changes: 6 additions & 6 deletions zilliqa/src/scilla.rs
Original file line number Diff line number Diff line change
@@ -931,12 +931,12 @@ impl ActiveCall {
} else {
// Remove multiple elements from storage having the same prefix specified by `indices`

let complete_empty_map = StorageValue::Map {
map: BTreeMap::new(),
complete: true,
};
self.state
.set_storage(self.sender, &name, &indices, StorageValue::complete_map())?;
self.state.set_storage(
self.sender,
&name,
&indices,
StorageValue::complete_map(),
)?;
}
} else if indices.len() == depth {
let Some(ValType::Bval(value)) = value.val_type else {