mirror of
https://github.com/pezkuwichain/revive.git
synced 2026-05-07 03:48:03 +00:00
add sha1 contract function integration test
Signed-off-by: xermicus <cyrill@parity.io>
This commit is contained in:
@@ -58,7 +58,7 @@ fn link_host_functions(engine: &Engine) -> Linker<State> {
|
||||
|caller: Caller<State>, out_ptr: u32, out_len_ptr: u32| -> Result<(), Trap> {
|
||||
let (mut caller, state) = caller.split();
|
||||
|
||||
assert_ne!(0, caller.read_u32(out_len_ptr)?);
|
||||
assert!(state.input.len() <= caller.read_u32(out_len_ptr).unwrap() as usize);
|
||||
|
||||
caller.write_memory(out_ptr, &state.input)?;
|
||||
caller.write_memory(out_len_ptr, &(state.input.len() as u32).encode())?;
|
||||
|
||||
Reference in New Issue
Block a user