Skip to content
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

server/apidata: fix 24-hour calcs #1746

Merged
merged 1 commit into from
Jul 31, 2022
Merged

server/apidata: fix 24-hour calcs #1746

merged 1 commit into from
Jul 31, 2022

Conversation

buck54321
Copy link
Member

Fixes the calculation of 24 hour volume and price change. I was using
the same cache for every market before. duh.

Fixes the calculation of 24 hour volume and price change. I was using
the same cache for every market before. duh.
@buck54321 buck54321 changed the title fix 24-hour calcs server/apidata: fix 24-hour calcs Jul 31, 2022
startStamp := epochIdx * epochDur
endStamp := startStamp + epochDur
var cache5min *candles.Cache
const fiveMins = uint64(time.Minute * 5 / time.Millisecond)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if this is clearer than (5*time.Minute).Milliseconds() or just 5 * 60 * 1000, but ok

@chappjc chappjc merged commit 268021b into decred:master Jul 31, 2022
@JoeGruffins JoeGruffins mentioned this pull request Aug 1, 2022
@chappjc chappjc added this to the 0.5 milestone Aug 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants