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

feat(payment-detection): add subgraphMinIndexedBlock option #1253

Closed
wants to merge 11 commits into from

Conversation

alexandre-abrioux
Copy link
Member

@alexandre-abrioux alexandre-abrioux commented Nov 16, 2023

Context

When using TheGraph decentralized network, different GQL queries can target different indexers. For consistency, we can ask to target only indexers that have processed specific blocks using a block filter.

For more info, see here or here, look for number_gte in these pages.

Description of the changes

  • Added a new option subgraphMinIndexedBlock to the PaymentNetworkOptions
  • Simplified all detectors instantiation. Since they are all passed the same options (see here) they all can have the same constructor. It simplifies adding new options without having to update every detector manually.

@coveralls
Copy link

coveralls commented Nov 22, 2023

Coverage Status

coverage: 86.918%. remained the same
when pulling 42aebe9 on subgraph-min-indexed-block
into 71b2c46 on master.

@benjlevesque
Copy link
Contributor

I feel the option is a bit awkward, I'd rather have it directly on the client, see my proposal

@benjlevesque
Copy link
Contributor

Also, I wonder if grouping the options is a good move, considering #1202 and #1211

@alexandre-abrioux
Copy link
Member Author

Closing this in favor of #1262 following @benjlevesque's recommendations

@alexandre-abrioux alexandre-abrioux deleted the subgraph-min-indexed-block branch November 23, 2023 15:26
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

Successfully merging this pull request may close these issues.

None yet

3 participants