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
In the prune orders function, there's a remove all function that iterates over both the bid and ask queues to find orders owned by a particular open orders account. The issue with this is that if you have an orderbook with a lot of orders the function can run out compute units. While the solution to this in the function is to lower the limit parameter, I was wondering about the design of the function. Is there a reason why it's necessary to iterate over the bid and ask queues to get the order ids when the open orders account already stores the order ids?
In the prune orders function, there's a
remove all
function that iterates over both the bid and ask queues to find orders owned by a particular open orders account. The issue with this is that if you have an orderbook with a lot of orders the function can run out compute units. While the solution to this in the function is to lower thelimit
parameter, I was wondering about the design of the function. Is there a reason why it's necessary to iterate over the bid and ask queues to get the order ids when the open orders account already stores the order ids?serum-dex/dex/src/matching.rs
Lines 146 to 168 in 5b43fe1
vs. how just passing the order id to remove the leaf node, like in the cancel order function?
serum-dex/dex/src/matching.rs
Lines 931 to 942 in 5b43fe1
The text was updated successfully, but these errors were encountered: