-
Notifications
You must be signed in to change notification settings - Fork 650
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
refactor get_top_markets issue #842 #1549
Conversation
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.
Some minor changes in the constructor may allow for in-place construction.
price latest_price = asset( mto.latest_base, mto.base ) / asset( mto.latest_quote, mto.quote ); | ||
if( mto.base != asset_base.id ) | ||
latest_price = ~latest_price; | ||
latest = database_api_impl::price_to_string( latest_price, asset_base, asset_quote ); |
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.
Refactor suggestion (may be out of the scope of this ticket): put database_api_impl::price_to_string in some kind of common area. market_ticker should not have to know about database_api_impl, and database_api_impl::price_to_string shouldn't know about graphene::app::price_to_string.
@jmjatlanta you may have interest in the first PR (#924) where we've addressed some issues. It's a pity that the code was abandoned. |
I had refactored to in-place constructor by comments from @jmjatlanta and by using parts of #924 |
@abitmore please have a look for Review of this PR. Thanks |
Thanks. I took a look at it. This code looks very similar now. Is there something that you liked better in #924? Or is it just the fact that it was done twice? |
This is a replacement for pull request #1273 for issue #842.
Sorry i had to do it this way, the reason of the replacement is build problems at
oxarbitrage:issue842
that i was not able to fix by merging thedevelop
into the feature branch. Some issue with the websocket submodule.Anyway, to avoid losing too much time on it i created this one that is almost the same(the last review comments were already addressed in #1273). On top of that, new pull modifies the method names according to our (not written yet) style guide: #1318 (comment)