get10101 / 10101

10101 (Ten-Ten-One): Self-custodial derivative trading at your fingertips.
https://10101.finance
MIT License
124 stars 21 forks source link

Remove insane `compile_error!` #2611

Closed luckysori closed 1 month ago

luckysori commented 1 month ago

I was trying to fail at compile time based on a runtime value (the settings). This is dumb.

We now fail at runtime if we try to use a fixed index price in release mode. Production always runs on release, so this exists to prevent using a fixed index price in production.

Obviously, release does not always equal production, but using the real index price from BitMEX is fine in most scenarios (except for the e2e tests and some instances of local testing).


This should fix problems like this one, which were preventing us from building the coordinator in release mode 🤦