Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

WASM Remove blockhash error #7121

Merged
merged 3 commits into from
Nov 26, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion ethcore/res/wasm-tests
2 changes: 1 addition & 1 deletion ethcore/wasm/src/env.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ pub const SIGNATURES: &'static [UserFunctionDescriptor] = &[
Static(
"_blockhash",
&[I64, I32],
Some(I32),
None,
),
Static(
"_coinbase",
Expand Down
2 changes: 1 addition & 1 deletion ethcore/wasm/src/runtime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -665,7 +665,7 @@ impl<'a, 'b> Runtime<'a, 'b> {

self.memory.set(return_ptr, &*hash)?;

Ok(Some(0i32.into()))
Ok(None)
}

fn return_address_ptr(&mut self, ptr: u32, val: Address) -> Result<(), InterpreterError>
Expand Down
2 changes: 1 addition & 1 deletion ethcore/wasm/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -765,7 +765,7 @@ fn externs() {
"Gas limit requested and returned does not match"
);

assert_eq!(gas_left, U256::from(94_733));
assert_eq!(gas_left, U256::from(94_858));
}

#[test]
Expand Down