mirror of https://github.com/crytic/echidna
Fixed timestamp/blocknumber issue and improved value generation with these values (#469)
parent
d8804f3e2d
commit
59898043e4
@ -0,0 +1,18 @@ |
||||
contract C { |
||||
bool state; |
||||
uint time; |
||||
|
||||
function set() public { |
||||
time = now; |
||||
} |
||||
|
||||
function guess(uint x) public { |
||||
if (x <= time + 1 weeks && x >= time - 1 weeks ) |
||||
state = true; |
||||
} |
||||
|
||||
function echidna_now() public returns(bool) { |
||||
return (!state); |
||||
} |
||||
|
||||
} |
Loading…
Reference in new issue