-
Notifications
You must be signed in to change notification settings - Fork 162
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
fix: convert v0 -> v1 before base32 conversion #527
Conversation
e63e10a
to
1adc8a5
Compare
iroh-resolver/src/content_loader.rs
Outdated
.into_v1() | ||
.unwrap() | ||
.to_string_of_base(Base::Base32Lower) | ||
.unwrap(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are you sure this can never error?
iroh-resolver/src/content_loader.rs
Outdated
let cid_str = cid.to_string_of_base(Base::Base32Lower).unwrap(); | ||
let cid_str = cid | ||
.into_v1() | ||
.unwrap() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are you sure this can never error?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
then though shall handle the error :)
fixes n0-computer/beetle#77
turns out you can't go straight from v0 -> base32 v1, which makes sense, but is irritating. Better than the alternative of silently converting into cidv1 I guess.
Anyway, fixes the gateway