Skip to content

Commit

Permalink
fix: update based on feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
nick-bisonai committed Nov 12, 2024
1 parent d68433e commit 72f7c1f
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions contracts/v0.2/src/SubmissionProxy.sol
Original file line number Diff line number Diff line change
Expand Up @@ -471,10 +471,6 @@ contract SubmissionProxy is Ownable {
revert AnswerOutdated();
}

if (lastSubmissionTimes[_feedHash] >= _timestamp) {
return;
}

(bytes[] memory proofs_, bool success_) = splitProofs(_proof);
if (!success_) {
// splitting proofs failed -> do not submit!
Expand All @@ -493,6 +489,9 @@ contract SubmissionProxy is Ownable {

bytes32 message_ = keccak256(abi.encodePacked(_answer, _timestamp, _feedHash));
if (validateProof(_feedHash, message_, proofs_)) {
if (lastSubmissionTimes[_feedHash] >= _timestamp) {
return;
}
feeds[_feedHash].submit(_answer);
lastSubmissionTimes[_feedHash] = _timestamp;
} else {
Expand Down

0 comments on commit 72f7c1f

Please sign in to comment.