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

peerstore: add contexts to all methods #2312

Merged

Conversation

chaitanyaprem
Copy link
Contributor

Addressing #2231

Brief of changes:

  • Included an argument to accept contexts for all PeerStore interfaces.
  • Wherever there is a background worker or a loop running in the flow, chosen to use the context.Background().
  • All test code is updated to use context.Background().
  • Areas that are unclear, used context.TODO()

Ran complete test-suite in ubuntu-20.04 after changes successfully.

Copy link
Contributor

@marten-seemann marten-seemann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thank you @chaitanyaprem!

@marten-seemann marten-seemann changed the title feat: Enhance PeerStore interfaces to accept contexts peerstore: add contexts to all methods May 30, 2023
@chaitanyaprem
Copy link
Contributor Author

@marten-seemann It would be better to merge this PR if there are no issues, otherwise changes keep happening and require lot of merges from master.

@marten-seemann
Copy link
Contributor

You're right. Sorry, didn't mean to cause you extra trouble. Will merge as soon as CI passes.

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.

Peerstore interfaces should accept contexts
2 participants