Skip to content

Commit 19bda59

Browse files
authored
name(specify we are using the fallbackRNG)
1 parent 33a7022 commit 19bda59

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

contracts/standard/rng/BeaconRNG.sol

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@ contract BeaconRNG {
1818
uint public constant LOOKAHEAD = 132; // Number of blocks that has to pass before obtaining the random number. 4 epochs + 4 slots, according to EIP-4399.
1919
uint public constant ERROR = 32; // Number of blocks after which the lookahead gets reset, so eligible blocks after lookahead don't go long distance, to avoid a possiblity for manipulation.
2020

21-
RNG public blockhashRNG; // Address of blockhashRNG to fall back on.
21+
RNG public blockhashRNGFallback; // Address of blockhashRNGFallback to fall back on.
2222

2323
/** @dev Constructor.
24-
* @param _blockhashRNG The blockhash RNG deployed contract address.
24+
* @param _blockhashRNGFallback The blockhash RNG deployed contract address.
2525
*/
26-
constructor(RNG _blockhashRNG) public {
27-
blockhashRNG = _blockhashRNG;
26+
constructor(RNG _blockhashRNGFallback) public {
27+
blockhashRNGFallback = _blockhashRNGFallback;
2828
}
2929

3030
/**
@@ -40,7 +40,7 @@ contract BeaconRNG {
4040
function getUncorrelatedRN(uint _block) public returns (uint) {
4141
// Pre-Merge.
4242
if (block.difficulty <= 2**64) {
43-
uint baseRN = blockhashRNG.getRN(_block);
43+
uint baseRN = blockhashRNGFallback.getRN(_block);
4444
if (baseRN == 0) {
4545
return 0;
4646
} else {

0 commit comments

Comments
 (0)