Assessment reports>Spectral Modelers>Threat Model>setModelerNetPerformanceResultAndUpdate

Function: setModelerNetPerformanceResultAndUpdate(address modeler, uint256 medianPerformanceResults)

This function updates the performance results of a modeler in the system.

Inputs

  • modeler

    • Control: Controlled by the caller.

    • Constraints: N/A.

    • Impact: Identifies the modeler whose performance results are being updated.

  • medianPerformanceResults

    • Control: Controlled by the caller.

    • Constraints: N/A.

    • Impact: The modeler's position in the top modelers' list, affecting their visibility in the system.

Branches and code coverage

Intended branches

  • Check if the topNModelers list is empty and add a new modeler if true.

  • Insert new modeler if topNModelers has space.

  • Replace the lowest modeler if the new modeler's performance is better.

Negative behavior

  • Revert if the modeler is not in modelerToMedian mapping.

Zellic © 2024Back to top ↑