From db7a049253aaaab3561f0787f0d00c2d5931f0f8 Mon Sep 17 00:00:00 2001 From: Sergey Pepyakin Date: Wed, 22 Nov 2017 16:54:29 +0300 Subject: [PATCH 1/2] Remove blockhash error --- ethcore/wasm/src/env.rs | 2 +- ethcore/wasm/src/runtime.rs | 2 +- ethcore/wasm/src/tests.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ethcore/wasm/src/env.rs b/ethcore/wasm/src/env.rs index 1004f3526ab..ed4bda68b21 100644 --- a/ethcore/wasm/src/env.rs +++ b/ethcore/wasm/src/env.rs @@ -115,7 +115,7 @@ pub const SIGNATURES: &'static [UserFunctionDescriptor] = &[ Static( "_blockhash", &[I64, I32], - Some(I32), + None, ), Static( "_coinbase", diff --git a/ethcore/wasm/src/runtime.rs b/ethcore/wasm/src/runtime.rs index 0782876b5bb..bad325fbf98 100644 --- a/ethcore/wasm/src/runtime.rs +++ b/ethcore/wasm/src/runtime.rs @@ -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> diff --git a/ethcore/wasm/src/tests.rs b/ethcore/wasm/src/tests.rs index f5738871b0f..a387f929266 100644 --- a/ethcore/wasm/src/tests.rs +++ b/ethcore/wasm/src/tests.rs @@ -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] From ee402b0d92fafe98caa271135086fef9ecd03531 Mon Sep 17 00:00:00 2001 From: Sergey Pepyakin Date: Wed, 22 Nov 2017 18:18:42 +0300 Subject: [PATCH 2/2] Update tests. --- ethcore/res/wasm-tests | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ethcore/res/wasm-tests b/ethcore/res/wasm-tests index e5fcae4e9c2..d6185ea16ea 160000 --- a/ethcore/res/wasm-tests +++ b/ethcore/res/wasm-tests @@ -1 +1 @@ -Subproject commit e5fcae4e9c2a570f293a22baa4d78d9f4b391a0f +Subproject commit d6185ea16eaba7ff685c069c2064819f9549c4d7