When passing a governance proposal to add an asset to the mandatory and accept list at the same time there is a random chance (due to the nature of golangs range map implementation) that the validation will hit the MandatoryList first. When this happens the accept list does not contain all denoms in the mandatory list and the gov prop fails. Instead of looping over the keys and using a case statement we could explicitly set the order of validation.
Summary of Bug
When passing a governance proposal to add an asset to the mandatory and accept list at the same time there is a random chance (due to the nature of golangs range map implementation) that the validation will hit the MandatoryList first. When this happens the accept list does not contain all denoms in the mandatory list and the gov prop fails. Instead of looping over the keys and using a case statement we could explicitly set the order of validation.
Code location: https://github.com/ojo-network/ojo/blob/main/x/oracle/keeper/msg_server.go#L158-L189
Another possible solution: https://github.com/ojo-network/ojo/issues/256
For Admin Use