fluidex / circuits

GNU Affero General Public License v3.0
10 stars 5 forks source link

feature: implement strategy of overwrite order tree in state_manager #104

Open lispc opened 3 years ago

lispc commented 3 years ago
# finished orders can never be used again
order_leaf_to_overwrite = `select order_leaf where state = 'finished' order by id asc limit 1;`
if order_leaf_to_overwrite is None:
    # oldest open order is less probable to be used later? heuristic 
    order_leaf_to_overwrite = `select order_leaf order by id asc limit 1;`
lispc commented 3 years ago

implemented in the rust repo. Not tested yet