You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have been trying to get the referendas and invert their order, and stop as soon as I find an older rfc than the start date, but some events occur latter than a new one, breaking that idea.
There is no way to filter them before fetching them, right?
Events? But I see that we iterate over their indexes. Do you mean a referendum number 100 can have a start date earlier than referendum 99?
We use two types of dates:
Ongoing referenda: When it was submitted.
approved, rejected, timedOut, killed or cancelled: When it got to this stage.
It can be that we have 3 rfcs:
Is ongoing and was submitted at 6pm
Is closed and it was closed at 9pm
Is ongoing and was submitted at 7pm
My first thought was to check the array in an inverted order: Iterate on [3, 2, 1] and, if the date of the event is older than the startDate, break the loop and assume that any referenda with a lower index will be older.
But as I just showed in the example, it can happen than a value with a lower index changed it state on a later date, making my thought process wrong.
Now, I don't really know how to proceed, as I can't discard earlier indexes given that they may have a more modern state, but the list will only continue to grow.
One of those tests keeps growing in time, on every new referendum.
We should somehow limit this.
The text was updated successfully, but these errors were encountered: