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

chore(x/genutil): cleanup CollectTxs #17816

Merged
merged 1 commit into from
Sep 21, 2023
Merged

chore(x/genutil): cleanup CollectTxs #17816

merged 1 commit into from
Sep 21, 2023

Conversation

odeke-em
Copy link
Collaborator

This change moves []os.DirEntry close to where it is used and also reuses the already created sdk.AccAddress.String() []byte->string (sure it is cached but unnecessary to re-invoke) as a key to the balancesMap.

Fixes #17814

/cc @elias-orijtech

@odeke-em odeke-em marked this pull request as ready for review September 20, 2023 04:38
@odeke-em odeke-em requested a review from a team as a code owner September 20, 2023 04:38
@github-actions github-actions bot added the C:x/genutil genutil module issues label Sep 20, 2023
@github-prbot github-prbot requested review from a team, tac0turtle and likhita-809 and removed request for a team September 20, 2023 04:38
@julienrbrt julienrbrt changed the title chore: x/genutil: cleanup CollectTxs chore(x/genutil): cleanup CollectTxs Sep 20, 2023
Copy link
Member

@julienrbrt julienrbrt left a comment

Choose a reason for hiding this comment

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

I think it is better to fail early? Otherwise we iterate over the balances and possibly fail after.

This change reuses the already created sdk.AccAddress.String()
[]byte->string (sure it is cached but unnecessary to re-invoke)
as a key to the balancesMap.

Fixes #17814
@odeke-em
Copy link
Collaborator Author

Got and thanks for the review @julienrbrt, please see the latest!

@odeke-em odeke-em requested a review from julienrbrt September 21, 2023 02:07
@odeke-em odeke-em enabled auto-merge September 21, 2023 02:20
@odeke-em odeke-em added this pull request to the merge queue Sep 21, 2023
Merged via the queue into main with commit 0abb4e6 Sep 21, 2023
43 of 47 checks passed
@odeke-em odeke-em deleted the x-genutils-cleanup branch September 21, 2023 06:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C:x/genutil genutil module issues
Projects
None yet
2 participants