Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.

Commit 331f642

Browse files
committed
remove value_len == 0 constraint for ext_set_storage
1 parent 77a7b73 commit 331f642

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

frame/contracts/src/wasm/runtime.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -368,13 +368,6 @@ define_env!(Env, <E: Ext>,
368368
// Bail out if value length exceeds the set maximum value size.
369369
return Err(sp_sandbox::HostError);
370370
}
371-
if value_len == 0 {
372-
// Bail out on setting storage to an emptry entry.
373-
//
374-
// We might remove this constraint later if there are actual
375-
// use cases that require setting empty contract storage entries.
376-
return Err(sp_sandbox::HostError);
377-
}
378371
let mut key: StorageKey = [0; 32];
379372
read_sandbox_memory_into_buf(ctx, key_ptr, &mut key)?;
380373
let value = Some(read_sandbox_memory(ctx, value_ptr, value_len)?);

0 commit comments

Comments
 (0)