Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix bug with orders in orders and jit_orders (#505)
This PR fixes a bug in order and batch data which lead to duplicate entries. The problem is that orders can currently be part of the `orders` and `jit_orders` table. In our queries, we `union all` those to create an `order_data` table which keeps those duplicates. In following joins we keep those duplicates and even create new ones. This PR just changes the `union all` to a `union distinct`. This removed duplicates from `order_data`. Due to the unique `uid` column of that table there cannot be legitimate duplicates. The change has been tested locally for auction `10114998`, which currently has duplicate data for order `0xdb57e3403321e6565da156f1f9c8e4b8e305ee0e257ccde6d2628ae532d76a28fb84bcea1442dc40b903ebe17c3dffebe9a20cf3679a1184` on Dune.
- Loading branch information