daifoundation / maker-otc

The OasisDEX protocol - Simple on-chain market for ERC20 tokens
GNU Affero General Public License v3.0
101 stars 39 forks source link

Rebuild function to check sort info #184

Closed gbalabasquer closed 4 years ago

gbalabasquer commented 4 years ago

I've renamed the function as every existing offer should have sort info now. That is why I think is better to just directly check if isActive or if there is prev or next value.

On the other hand I understand that just checking isActive is enough for the _unsort function. However for _sort function we actually need to see if there is sort info. The main purpose of having a delb value instead of just removing the data is to avoid a new created offer that is using as position a recently cancelled offer to start from scratch.

gbalabasquer commented 4 years ago

This change is kind of also included in https://github.com/makerdao/maker-otc/pull/185. If that PR is merged, then this one should be closed.

gbalabasquer commented 4 years ago

Let's close it for now. If 185 doesn't get merged we will reopen.