-
Notifications
You must be signed in to change notification settings - Fork 119
Sma3 #288
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
jayantk
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this looks very solid to me. Pretty much all of the comments are minor except the one about the true which i think should be false.
| impl PriceAccountWrapper { | ||
| pub fn initialize_time_machine(&mut self) -> Result<(), OracleError> { | ||
| // TO DO | ||
| #[cfg(test)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe comment why this is cfg(test)? I presume you're doing some sort of feature flag thing to keep this code out of the real deployment?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fwiw I think a better place for this flag would actually be around the code the resize account code + the code that calls add_price_to_time_machine.
This is fine for this PR though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added some comments. We can definitely gate those two instructions, but there's a test in the python for resizing that would need to get scrapped (the python tests use the production version of the rust binary).
|
|
jayantk
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice!
Sma base implementation. It only implements 30min prices (no confidence).
It is gated by
cfg(test)flags while in development.