-
Notifications
You must be signed in to change notification settings - Fork 190
[DataAvaliability] Add opportunity to extract data from storages #7394
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
[DataAvaliability] Add opportunity to extract data from storages #7394
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #7394 +/- ##
==========================================
+ Coverage 41.05% 42.76% +1.70%
==========================================
Files 2207 1591 -616
Lines 193490 146192 -47298
==========================================
- Hits 79442 62514 -16928
+ Misses 107439 78337 -29102
+ Partials 6609 5341 -1268
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
@@ -125,3 +125,15 @@ func (t *TransactionResultErrorMessages) Store( | |||
|
|||
return nil | |||
} | |||
|
|||
// Data returns a copy of all stored transaction result error messages keyed by block ID. | |||
func (t *TransactionResultErrorMessages) Data() []flow.TransactionResultErrorMessage { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is redundant as we use storage for only 1 block. This ByBlockID
func can be used instead. Maybe, there's more such functions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added a comment about using consistent naming, otherwise looks good. we can make any needed tweaks when implementing the persister
Closes #7378
This PR introduces Data() function that returns a copy of cached data in every storage. Not sure persister will need a copy, but as we use mutexes in the storages, we have to return a copy currently. This can be changed in the future