zeitgeist
zeitgeist copied to clipboard
[PM] `ensure_can_not_dispute_the_same_outcome` only checks for the last outcome, but should for each of them
While implementing the global disputes mechanism I realised, that each new dispute only compares with the last dispute for a match, but it should compare with all disputes, if there is a match (so that a new dispute gets rejected).
https://github.com/zeitgeistpm/zeitgeist/blob/ba6efa8a2d20884bd2abb3077a341d633ee14f0d/zrml/prediction-markets/src/lib.rs#L1491-L1502
This is by design. Think about how it used to be in simple-disputes
: Someone disputes A, then someone disputes B. Should A be off the table forever now? No, of course not.
Now that simple-disputes
is removed, we could have a discussion about changing this, though.
I just realised it in the test, yeah you are right, it makes sense as it was.
But on the second look for the global dispute mechanism it would make much sense to change that. So that the users don't dispute on the same outcome. I will add that to the Global dispute PR.
Fixed by moving the logic to simple disputes https://github.com/zeitgeistpm/zeitgeist/pull/938