Add utility functions from hub #89
No reviewers
Labels
No labels
area: devops
area: discovery
area: docs
area: livestream
area: proposal
consider soon
dependencies
Epic
good first issue
hacktoberfest
help wanted
icebox
level: 1
level: 2
level: 3
level: 4
needs: exploration
needs: grooming
needs: priority
needs: repro
needs: tech design
on hold
priority: blocker
priority: high
priority: low
priority: medium
resilience
Tom's Wishlist
type: bug
type: discussion
type: improvement
type: new feature
type: refactor
type: task
type: testing
unplanned
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: LBRYCommunity/lbry.go#89
Loading…
Reference in a new issue
No description provided.
Delete branch "add_utility_funcs"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
this should be called NormalizeName, since its specific to claim names
all these functions could use just a bit of documentation about what they're for
name this TxidToHash?
this should use the ReverseBytes function in this very file :-)
ReverseBytes()
maybe call this TxHashToTxid()? since these are in lbry.go now, its a generic location and it's not clear what they're for
Yeah makes sense. I'm also taking a look at this function and it's only used in a print statement, nothing really relies on it, but if I understand the semantic of copy, I'm not sure it works as intended, it's copying the hash to t, then reversing the bytes on the hash, but then encoding and returning t, I think it wants to reverse the bytes on t?
yea that's weird. it should reverse t. the whole point is that the reverse does it in-place so we copy to avoid messing with the original
here's what should really happen: ReverseBytes should stop reversing in place. it should return a copy. or alternatively, it should be called ReverseInPlace or something. otherwise its very surprising.