Skip to content

refactor(kad): Add Key to InboundRequest::{AddProvider, PutRecord}. #6049

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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

dariusc93
Copy link
Member

Description

This PR introduces Key to InboundRequest::AddProvider and InboundRequest::PutRecord to provide the record key when it is inserted into the RecordStore.

Resolves #6048.

Notes & open questions

While one could just enable filtering, check the record for the key and then insert it into the store, I do feel this would provide information without requiring one to enable filtering and be responsible for inserting into the store.

Question:

  1. Should we instead have it as Option<Key> so when if filtering is enabled, the field would return None and with it being . disabled, it would return Some(_)?

Change checklist

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • A changelog entry has been made in the appropriate crates

@dariusc93 dariusc93 self-assigned this Jun 5, 2025
@dariusc93 dariusc93 marked this pull request as ready for review June 6, 2025 22:12
@dariusc93 dariusc93 requested review from jxs and elenaf9 June 6, 2025 22:13
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.

kad: Add Key to InboundRequest::{PutRecord, AddProvider}
1 participant