Skip to content
Closed
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
9 changes: 7 additions & 2 deletions src/Redistribution.sol
Original file line number Diff line number Diff line change
Expand Up @@ -671,8 +671,13 @@ contract Redistribution is AccessControl, Pausable {
* @notice Updates the source of randomness. Uses block.difficulty in pre-merge chains, this is substituted
* to block.prevrandao in post merge chains.
*/
function updateRandomness() private {
seed = keccak256(abi.encode(seed, block.prevrandao));
function updateRandomness() internal virtual {
seed = _nextSeedValue();
}

/// @dev Extracted for fuzz harnesses that must pin post-reveal randomness to fixture data.
function _nextSeedValue() internal view virtual returns (bytes32) {
return keccak256(abi.encode(seed, block.prevrandao));
}

/**
Expand Down
Loading