Function: respondToChallenge(address _validator, string _ipfsResponse)
This facilitates responding to a challenge.
Inputs
_validatorControl: Fully controlled by the caller.
Constraints: Checked that the validator is registered.
Impact: The validator that gave the challenge.
_ipfsResponseControl: Fully controlled by the caller.
Constraints: None.
Impact: The IPFS of the response.
Branches and code coverage
Intended branches
Assumed that the
_validatoractually challenged the caller with the specificipfsChallenge. Currently not explicitly checked.Assumed that the challenge was given for this contract's specific competition. Currently not explicitly checked.
Set the
ipfsResponseof themodelerChallengesmapping for themodeler.Assure that the
_validatorhas been registered.
Negative behavior
Should not reuse a response that has already been used. Currently not checked.
Should not allow overriding a response to a challenge. Currently not checked.
Should not allow calling this while the contract is paused.
Should not allow a
msg.senderthat has not registered as a modeler to respond to a challenge.