Skip to content

Commit

Permalink
Merge pull request #815 from oceanprotocol/potential-improvements-dt3
Browse files Browse the repository at this point in the history
Potential improvements for DT3
  • Loading branch information
trizin authored Sep 26, 2023
2 parents 76eb7eb + 4102ddf commit c3b1b87
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

Check warning

Code scanning / Slither

Conformance to Solidity naming conventions Warning

) 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 c3b1b87

Please sign in to comment.