zeitgeist icon indicating copy to clipboard operation
zeitgeist copied to clipboard

[PM] `ensure_can_not_dispute_the_same_outcome` only checks for the last outcome, but should for each of them

Open Chralt98 opened this issue 2 years ago • 3 comments

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

Chralt98 avatar Jul 19 '22 06:07 Chralt98

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.

maltekliemann avatar Jul 19 '22 07:07 maltekliemann

I just realised it in the test, yeah you are right, it makes sense as it was.

Chralt98 avatar Jul 19 '22 07:07 Chralt98

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.

Chralt98 avatar Jul 19 '22 07:07 Chralt98

Fixed by moving the logic to simple disputes https://github.com/zeitgeistpm/zeitgeist/pull/938

Chralt98 avatar Oct 18 '23 10:10 Chralt98