Skip to content

Commit b4711ba

Browse files
committed
Comment updated
1 parent 4537259 commit b4711ba

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

contracts/standard/rng/BlockhashRNGFallbackRange.sol

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ contract BlockHashRNGFallback is BlockHashRNG {
3030
*/
3131
function saveRN(uint _block) public {
3232
if (_block < block.number && randomNumber[_block] == 0) { // If the random number is not already set and can be.
33-
// The below equation is valid for all cases (last 256 blockhash of blocks or even earlier than that).
33+
// Returns the blockhash of _block if accessible (one of the last 256 blocks).
34+
// If the blockhash hasn't been saved in time, return a blockhash of a block in range as a fallback.
3435
randomNumber[_block] = uint(blockhash((block.number-1) - (block.number-1-_block)%256));
3536
}
3637

0 commit comments

Comments
 (0)