Skip to content

peerstore: add contexts to all methods#2312

Merged
marten-seemann merged 3 commits intolibp2p:masterfrom
chaitanyaprem:feat/peerstore-intf-context
Jun 3, 2023
Merged

peerstore: add contexts to all methods#2312
marten-seemann merged 3 commits intolibp2p:masterfrom
chaitanyaprem:feat/peerstore-intf-context

Conversation

@chaitanyaprem
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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