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

[Malleability] BlocksByCollection #6666

Open
Tracked by #6646
UlyanaAndrukhiv opened this issue Nov 14, 2024 · 1 comment
Open
Tracked by #6646

[Malleability] BlocksByCollection #6666

UlyanaAndrukhiv opened this issue Nov 14, 2024 · 1 comment
Assignees

Comments

@UlyanaAndrukhiv
Copy link
Contributor

UlyanaAndrukhiv commented Nov 14, 2024

Fix implementations of Entity and IDEntity so that it covers dynamic data too

@illia-malachyn
Copy link
Contributor

illia-malachyn commented Jan 17, 2025

Neither Entity nor IDEntity covers all fields.

BlocksByCollection is used in herocache. That's why it implements Entity and IDEntity. However, it uses only collectionID to uniquely identify an object of the type. It looks like a misuse.

I'm moving it to #6646 epic.

func (b *BlockByCollections) Get(collID flow.Identifier) (*entity.BlocksByCollection, bool) {
backdata := &BlockByCollectionBackdata{b.backData}
return backdata.ByID(collID)
}

@illia-malachyn illia-malachyn changed the title [Malleability A] BlocksByCollection [Malleability] BlocksByCollection Jan 17, 2025
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

No branches or pull requests

2 participants