Skip to content

feat: add accounts count to delta and total stats#2109

Open
yaboiishere wants to merge 11 commits intomasterfrom
account_stats
Open

feat: add accounts count to delta and total stats#2109
yaboiishere wants to merge 11 commits intomasterfrom
account_stats

Conversation

@yaboiishere
Copy link
Copy Markdown
Contributor

@yaboiishere yaboiishere commented Feb 27, 2025

This PR includes a long-ish migration around ~12 hours locally
resolves: #2040

@yaboiishere yaboiishere marked this pull request as ready for review March 13, 2025 12:15
@yaboiishere yaboiishere requested review from jyeshe and sborrazas March 17, 2025 10:20

defp get_accounts(state, from_txi, next_txi) do
state
|> Collection.stream(Model.Tx, {from_txi, next_txi})
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I don't think this is right. Model.Tx keys are just txis, how is this key going to compare with a plain number?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Oh, it is supposed to be the other clause of stream that accepts a key_boundary fixing it

defp get_accounts(state, from_txi, next_txi) do
state
|> Collection.stream(Model.Tx, {from_txi, next_txi})
|> Stream.take_while(&match?(txi when txi < next_txi, &1))
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No need for matching here Stream.take_while(&(&1 < next_txi))

@yaboiishere yaboiishere requested a review from sborrazas March 21, 2025 12:29
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.

add total acccounts to statistics endpoint

3 participants