Realtime stats are calculated on last week account blocks. Account blocks are retrieved by account block height. The momentum height is calculated using the frontier momentum height minus a fixed momentums per week constant of 60480. The calculated momentum height cannot be used to retrieve the last week account blocks and will always return an empty result.
Solution
Page through the account blocks until the momentum height of the confirmation detail is smaller than or equal to the calculated momentum height.
The less requests made the better. Ideally it should be avarage user tx a day times 7, which is dynamic depending the network usage with a minimum of 10.
Worked well on mainnet and devnet. I reviewed the code changes and didn’t identify any issues.
I think this could slide into v0.0.6 if others are okay with that.
We may need a public discussion about what is included in that version and what can wait until the next version (aka “negotiations”).
The realtime statistics are calculated on last week account blocks. Account blocks are retrieved by account block height. The momentum height is calculated using the frontier momentum height minus a fixed momentums per week constant of 60480. The calculated momentum height cannot be used to retrieve the last week account blocks and will always return an empty result.
How?
Page through the account blocks until the momentum height of the confirmation detail is smaller than or equal to the calculated momentum height.