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

refactor: remove index Assets in AssetsMap by AssetDefinitionId #4701

Merged

Conversation

DCNick3
Copy link
Contributor

@DCNick3 DCNick3 commented Jun 6, 2024

Description

AssetsMap stores assets for a particular account, so indexing them via AssetId (which is AccountId + AssetDefinitionId) is redundant

Also remove some unnecessary AccoundId clones

Linked issue

Closes #4700

Benefits

A bit more efficient, allows for more efficient implementations testing whether an account has some asset or not.

Checklist

  • make CI pass

@DCNick3 DCNick3 force-pushed the remove-redundant-key-in-assets-map branch from 9dbdc47 to ca6ed1f Compare June 6, 2024 11:00
@github-actions github-actions bot added the api-changes Changes in the API for client libraries label Jun 6, 2024
@DCNick3 DCNick3 force-pushed the remove-redundant-key-in-assets-map branch from ca6ed1f to f787554 Compare June 6, 2024 11:06
AssetsMap stores assets for a particular account, so indexing them via AssetId (which is AccountId + AssetDefinitionId) is redundant

Also remove some unnecessary AccoundId clones

Signed-off-by: ⭐️NINIKA⭐️ <[email protected]>
@DCNick3 DCNick3 force-pushed the remove-redundant-key-in-assets-map branch from f787554 to 53668dd Compare June 6, 2024 11:32
@DCNick3 DCNick3 merged commit 8157c45 into hyperledger-iroha:main Jun 6, 2024
10 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api-changes Changes in the API for client libraries
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AssetsMap's key is redundant
3 participants