Closed walldiss closed 1 year ago
Merging #201 (54ce402) into master (ba0ebb8) will increase coverage by
0.00%
. The diff coverage is100.00%
.
@@ Coverage Diff @@
## master #201 +/- ##
=======================================
Coverage 95.39% 95.40%
=======================================
Files 5 5
Lines 565 566 +1
=======================================
+ Hits 539 540 +1
Misses 15 15
Partials 11 11
Impacted Files | Coverage Δ | |
---|---|---|
namespace/id.go | 100.00% <100.00%> (ø) |
This namespace does include the namespace version so I think we can include this change here.
Any reason not to change the default behavior of String to be always hex encoded? The current String is sorta useless while having default human-readable support for Stringer everywhere is not, AFAICS. The current String implementation can still be done with string(ID) if anyone needs raw nid in string format.
@evan-forbes, @rootulp, thoughts?
My rationale for recommending a new HexString()
method is to avoid breaking compatability
changing existing String() method (would break compatibility)
If we can verify that no consumers of this library rely on the existing string representation then I think we can make the breaking change and modify the existing String()
method
@walldiss Could you please revise the title of the PR to capitalize HexString
? otherwise, it might be misleading, suggesting that the introduced method is private.
If we can verify that no consumers of this library rely on the existing string representation then I think we can make the breaking change and modify the existing String() method
I verified the usage in the node and it's used only in places where human-readable string is expected.
I'm fine with mergin either, but I tend to agree that returning hex makes a lot of sense. if we need a string() for some reason, we can just call string(id)
Merging b/c @walldiss doesn't have permission to.
Overview
Implements https://github.com/celestiaorg/nmt/issues/200