-
Notifications
You must be signed in to change notification settings - Fork 987
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
Track handlers in subgraph_features table #4820
Track handlers in subgraph_features table #4820
Conversation
@@ -47,6 +49,20 @@ impl blockchain::DataSource<Chain> for DataSource { | |||
self.source.start_block | |||
} | |||
|
|||
fn handler_kinds(&self) -> HashSet<&str> { | |||
let mut kinds = HashSet::new(); |
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.
Wondering if this should be a HashSet
or just a Vec
. But in ethereum
we have blockHandlers with filters so its needed to iterate over it and add it to a HashSet to avoid duplication.
At the end way up in the call path, we convert this to a HashSet anyway.
@@ -80,6 +80,11 @@ impl blockchain::DataSource<Chain> for DataSource { | |||
None | |||
} | |||
|
|||
fn handler_kinds(&self) -> HashSet<&str> { | |||
// This is placeholder, substreams do not have a handler kind. | |||
vec![SUBSTREAMS_HANDLER_KIND].into_iter().collect() |
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 was added as a placeholder to prevent having using an Option
@@ -0,0 +1,6 @@ | |||
truncate table subgraphs.subgraph_features; |
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.
truncating the table so that the new columns values will get populated, subgraph_features
table is populated during build_subgraph_runner
so it will repopulate all the entries on startup
3fb6c64
to
a90c656
Compare
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.
Looks good!
Closes #4772