Zannick/logic-graph

Allow setting a max price for movements

Ouverte

#165 ouverte le 22 mai 2024

 (0 commentaire) (0 réaction) (0 personne assignée)Rust (0 fork)auto 404
good first issue

Métriques du dépôt

Stars
 (4 étoiles)
Métriques de merge PR
 (Métriques PR en attente)

Description

Essentially, we want a way to deal with exit movements that have prices with them, and to ignore/drop the exit if its price is larger than the maximum possible. It should be better to not have the exit at all in the graph if it can never be used, but also it doesn't seem great to add the exit, generate the code, check the price, and replace the exit in the yaml with a comment about how it's impossible. So some sort of compromise might be helpful.

Emitting a warning for exceeding the max price and not creating an exit will be useful if the goal is to keep such exits from being defined. This is probably better than silently dropping the exit alone, especially if there are any errors in the exit definition. If we left in the exit, then any error that resulting in the exit being impossible to use can only be tracked down with unittests to explain it, which requires a cargo build and unittests on top of the codegen.

Guide contributeur