Skip to content

Commit

Permalink
fix: saving response id too early (#222)
Browse files Browse the repository at this point in the history
  • Loading branch information
gas1cent authored Oct 13, 2023
1 parent 74236c0 commit 73ef904
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion solidity/contracts/Oracle.sol
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,8 @@ contract Oracle is IOracle {

_responseId = keccak256(abi.encodePacked(_proposer, address(this), _requestId, _responseNonce++));
_participants[_requestId].add(_proposer);
_responseIds[_requestId].add(_responseId);
_responses[_responseId] = _request.responseModule.propose(_requestId, _proposer, _responseData, msg.sender);
_responseIds[_requestId].add(_responseId);

if (_responses[_responseId].proposer != _proposer) {
revert Oracle_CannotTamperParticipant();
Expand Down

0 comments on commit 73ef904

Please sign in to comment.