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

SubgraphDeployment struct #141

Open
2 tasks
pete-eiger opened this issue Apr 20, 2024 · 0 comments
Open
2 tasks

SubgraphDeployment struct #141

pete-eiger opened this issue Apr 20, 2024 · 0 comments
Labels
meta:triaged This issue has been triaged (has a good description, as well as labels for priority, size and type) p2 Medium priority size:small Small type:refactor Changes not visible to users

Comments

@pete-eiger
Copy link
Contributor

pete-eiger commented Apr 20, 2024

From @hopeyen's comment on a PR:

I'm thinking about the data structure being used here, and wondering what do you think about creating a struct for subgraph deployments that contains the fields of id, allocated, stake, block_number, block_hash, poi, ...? It feels like a more tidy way to tracking everything we care about for a particular deployment, and we just need to pass in a vec instead of all fields in vecs.
this might be a separate refactor effort though, just raising it since I was thinking about it

which was made in relation to this function's signature:

pub async fn process_comparison_results(
    blocks_str: String,
    num_topics: usize,
    result_strings: Vec<Result<ComparisonResult, OperationError>>,
    notifier: Notifier,
    db: SqlitePool,
    allocated_subgraphs: HashSet<String>,
)

We should:

  • create a new struct that holds data for a specific Subgraph deployment and use that instead of separate fields as arguments/values
  • add allocated_subgraphs to Radio operator and send the query inside network_check
@pete-eiger pete-eiger added type:refactor Changes not visible to users size:small Small p2 Medium priority meta:triaged This issue has been triaged (has a good description, as well as labels for priority, size and type) labels Apr 20, 2024
@pete-eiger pete-eiger self-assigned this Apr 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
meta:triaged This issue has been triaged (has a good description, as well as labels for priority, size and type) p2 Medium priority size:small Small type:refactor Changes not visible to users
Projects
None yet
Development

No branches or pull requests

1 participant