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

Make OpBasis AnyLinkableHash instead of AnyDhtHash #1601

Merged
merged 3 commits into from Sep 30, 2022
Merged

Conversation

maackle
Copy link
Member

@maackle maackle commented Sep 29, 2022

Summary

Since RegisterAddLink and RegisterRemoveLink are ops, and the link base is the op's basis, and link bases are AnyLinkableHash, then it follows that the op basis is actually that, not AnyDhtHash, which excludes the External hash type. This adjusts the code accordingly.

There was also a From<AnyLinkableHash> for AnyDhtHash, which is invalid because the External variant has no mapping in AnyDhtHash, so I removed it. It is also no longer needed, since the places it was used are no longer relevant with the type change.

TODO:

  • CHANGELOG(s) updated with appropriate info
  • Just before pressing the merge button, ensure new entries to CHANGELOG(s) are still under the UNRELEASED heading

Comment on lines -136 to -138
impl From<AnyLinkableHash> for AnyDhtHash {
fn from(hash: AnyLinkableHash) -> Self {
hash.retype(hash_type::AnyDht::Entry)
Copy link
Member Author

Choose a reason for hiding this comment

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

This From was invalid, so I flipped it around to make it valid.

@maackle maackle merged commit 082ee1c into develop Sep 30, 2022
@maackle maackle deleted the fix-holohash-from branch September 30, 2022 22:32
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

2 participants