Skip to content

Commit

Permalink
Tiny improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
trizin authored Sep 22, 2023
1 parent 76eb7eb commit 4102ddf
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions contracts/templates/ERC20Template3.sol
Original file line number Diff line number Diff line change
Expand Up @@ -1002,7 +1002,7 @@ contract ERC20Template3 is
bool predictedValue,
uint256 stake,
uint256 epoch_start
) external {
) external nonReentrant {
require(toEpochStart(epoch_start) == epoch_start, "invalid epoch");
require(paused == false, "paused");
require(epoch_start >= soonestEpochToPredict(block.timestamp), "too late to submit");
Expand Down Expand Up @@ -1145,8 +1145,7 @@ contract ERC20Template3 is
require(epoch_start <= curEpoch(), "too early to submit");
require(epochStatus[epoch_start] == Status.Pending, "already settled");
bool opfTimedout = curEpoch() > epoch_start + trueValSubmitTimeout;
bool epochPending = epochStatus[epoch_start] == Status.Pending;
if (cancelRound || (opfTimedout && epochPending)){
if (cancelRound || opfTimedout){
epochStatus[epoch_start]=Status.Canceled;
}
else{
Expand Down

0 comments on commit 4102ddf

Please sign in to comment.