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 DecodeEventRecord #281

Open
failfmi opened this issue Nov 15, 2023 · 1 comment
Open

refactor DecodeEventRecord #281

failfmi opened this issue Nov 15, 2023 · 1 comment

Comments

@failfmi
Copy link
Collaborator

failfmi commented Nov 15, 2023

DecodeEventRecord must take a DecodeEvent from the specific module.
https://github.com/LimeChain/gosemble/blob/develop/primitives/types/event.go#L46

@radkomih
Copy link
Collaborator

radkomih commented Apr 25, 2024

Events:             support.NewHashStorageValue(keySystem, keyEvents, func(*bytes.Buffer) (types.EventRecord, error) { return types.EventRecord{}, nil })

If anyone calls the Get() method on this storage item, it will invoke the DecodeEventRecord which does nothing (there are separate decoding functions for each event type). Most probably, it won't happen at runtime, however, at least we should log something or modify the method to ensure that the user is aware of this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 📋 Backlog
Development

No branches or pull requests

2 participants