Audit Submission Value
A validation function is needed to verify the generated results. This function is passed to the task’s built-in validate node function and executed on each participating node.
validateNode()
The validateNode
function contains the core logic of how a node's submission should be verified.
Update the validateNode
function with the code block below:
In the code above, the validateNode
function takes the submission value as a parameter, repeats the logic of fetching the latest doodle, and finally compares the latest doodle and the submission value. If they're a match, the node's submission is considered valid and the function returns true
; otherwise the function returns false
.
auditTask()
The auditTask
function submits the validateNode
function to K2 using the validateAndVoteOnNodes
helper function.
No need to edit this function when creating a task
Last updated