Skip to content

Commit 4afd207

Browse files
committed
Update host_exports.rs
1 parent 32dd8dd commit 4afd207

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

runtime/wasm/src/host_exports.rs

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1258,21 +1258,16 @@ impl HostExports {
12581258
state: &mut BlockState,
12591259
) -> Result<(), HostExportError> {
12601260
let entity_type = key.entity_type.clone();
1261-
1261+
12621262
if let Some(entity) = state.entity_cache.get(key, GetScope::Store)? {
12631263
state
12641264
.metrics
12651265
.track_storage_size_change(&entity_type, &entity, true);
12661266
state.metrics.track_entity_count_change(&entity_type, -1);
12671267
}
12681268

1269-
state
1270-
.entity_cache
1271-
.modifications
1272-
.push(EntityModification::remove(
1273-
key.clone(),
1274-
state.entity_cache.block_number,
1275-
));
1269+
// Use EntityCache's built-in removal handling
1270+
state.entity_cache.remove(key.clone())?;
12761271
Ok(())
12771272
}
12781273
}

0 commit comments

Comments
 (0)