Skip to content
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.

bank: factor accumulation out to helper on TotalAccountsStats #28502

Merged
merged 1 commit into from
Oct 20, 2022

Conversation

t-nelson
Copy link
Contributor

Problem

account stats accumulation into TotalAccountsStats is performed in a method on Bank with an inconvenient interface

Summary of Changes

move accumulation logic out to a helper on TotalAccountStats to ease reuse

@t-nelson t-nelson requested a review from brooksprumo October 20, 2022 06:55
Copy link
Contributor

@brooksprumo brooksprumo left a comment

Choose a reason for hiding this comment

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

Lgtm

I'm assuming you already have a usage for this refactoring as well; can you point me to it?

@t-nelson
Copy link
Contributor Author

Lgtm

I'm assuming you already have a usage for this refactoring as well; can you point me to it?

yep. top commit here #28461. i'm cutting out the account collection step in favor of directly accumulating/outputting during the accounts scan, so no iterator to pass in

@t-nelson t-nelson merged commit cb7fe87 into solana-labs:master Oct 20, 2022
@t-nelson t-nelson deleted the btasaa branch October 20, 2022 17:50
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants