Skip to content
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
8 changes: 4 additions & 4 deletions src/tests/chain_context_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -260,8 +260,8 @@ mod tests {
runtime
.call(&solidity_selector("test_prevrandao()"), &[])
.unwrap();
// DEFAULT_PREVRANDAO: 0000000000000000000000000505050505050505050505050505050505050505
runtime.assert_result("0000000000000000000000000505050505050505050505050505050505050505");
// DEFAULT_PREVRANDAO: 0505050505050505050505050505050505050505050505050505050505050505
runtime.assert_result("0505050505050505050505050505050505050505050505050505050505050505");
}

#[test]
Expand Down Expand Up @@ -292,8 +292,8 @@ mod tests {
runtime
.call(&solidity_selector("test_difficulty()"), &[])
.unwrap();
// DEFAULT_PREVRANDAO: 0000000000000000000000000505050505050505050505050505050505050505
runtime.assert_result("0000000000000000000000000505050505050505050505050505050505050505");
// DEFAULT_PREVRANDAO: 0505050505050505050505050505050505050505050505050505050505050505
runtime.assert_result("0505050505050505050505050505050505050505050505050505050505050505");
}

#[test]
Expand Down
3 changes: 1 addition & 2 deletions stdlib/chain.c
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,7 @@ void wrapper_block_coin_base(bytes32 *result) {
}

void wrapper_block_prevRandao(bytes32 *result) {
getBlockPrevRandao(12 + (ADDRESS_UINT)result); // 32 bytes
clear_first_12_bytes(result);
getBlockPrevRandao((ADDRESS_UINT)result); // 32 bytes
}

void wrapper_callvalue(uint256_t *result) {
Expand Down