Make storage_read/write return nothing

This commit is contained in:
Sergey Pepyakin 2017-11-20 16:38:54 +03:00
parent 2650154cd7
commit 7564b05572
2 changed files with 4 additions and 4 deletions

View File

@ -25,12 +25,12 @@ pub const SIGNATURES: &'static [UserFunctionDescriptor] = &[
Static(
"_storage_read",
&[I32; 2],
Some(I32),
None,
),
Static(
"_storage_write",
&[I32; 2],
Some(I32),
None,
),
Static(
"_balance",

View File

@ -168,7 +168,7 @@ impl<'a, 'b> Runtime<'a, 'b> {
self.ext.set_storage(key, val).map_err(|_| UserTrap::StorageUpdateError)?;
Ok(Some(0i32.into()))
Ok(None)
}
/// Read from the storage to wasm memory
@ -184,7 +184,7 @@ impl<'a, 'b> Runtime<'a, 'b> {
self.memory.set(val_ptr as u32, &*val)?;
Ok(Some(0.into()))
Ok(None)
}
/// Fetches balance for address