Function: _receiveVotingResults(uint128 wTime, address[] markets, uint256[] anzenAmounts)
This function is used to receive voting results from VotingController and add these results to the market reward data. Only the first message for a timestamp will be accepted; all subsequent messages will be ignored.
Inputs
wTimeControl: Arbitrary.
Constraints: Receive voting results only from VotingController.
Impact: A timestamp indicating the voting result.
marketsControl: Arbitrary.
Constraints: Receive voting results only from VotingController.
Impact: An array representing the market addresses.
anzenAmountsControl: Arbitrary.
Constraints: Receive voting results only from VotingController.
Impact: An array representing the number of Anzen rewards for the corresponding market.
Branches and code coverage
Intended branches
Ensure that the voting result of each timestamp is only received once.
Iterate over the markets array, merge new rewards with existing rewards, and update the market's reward rate and status.
Negative behavior
Revert if the markets and
anzenAmountsarrays are not of equal length.