Function load_tx_hash
Source pub fn load_tx_hash(buf: &mut [u8], offset: usize) -> Result<usize, SysError>
Available on neither crate feature native-simulator
nor crate feature stub-syscalls
.
Expand description
Load transaction hash
Return the loaded data length or a syscall error
§Arguments
buf
- a writable buf used to receive the data
offset
- offset
§Example
let mut tx_hash = [0u8; 32];
let len = load_tx_hash(&mut tx_hash, 0).unwrap();
assert_eq!(len, tx_hash.len());