Conversation
|
a currently failing test #700 that passes if rebased on this branch. |
Kixunil
left a comment
There was a problem hiding this comment.
I think u128 is not supported on all platforms. Could it be a problem for embedded?
src/util/taproot.rs
Outdated
There was a problem hiding this comment.
If it can never happen, why not just have +?
There was a problem hiding this comment.
i'd rather define the behavior correctly here should it ever overflow rather than wrapping around. Perhaaps defensively, but it'd be possible someone were to update the types/sizes later without appreciating this point.
|
I think u128 is supported on all platforms, either with a native type or a wrapper. We could also do the same trick with u32 and u64 and it wouldn't be an issue either (u32 is plenty IMO). |
sanket1729
left a comment
There was a problem hiding this comment.
Thanks for testing this. ACK modulo removing the error variant.
src/util/taproot.rs
Outdated
There was a problem hiding this comment.
Can you also remove the Error variant from the error enum?
… from ever happening with wider integers
9a40597 to
f2a6827
Compare
1518517 Decrease Huffman weight type to 32 bits (Jeremy Rubin) Pull request description: This builds on #699 but is the more bikesheddable part since it changes the API. > u32 of weight should be enough for any branch. -- Bill Gates ACKs for top commit: dr-orlovsky: utACK 1518517 Kixunil: ACK 1518517 Tree-SHA512: 9c507ae6129dda8dc069b0a142181a78cf89cb3ebf9d2169c46662822cb4ea9ed075bf484528f5399fe0ed383a425174a702e2d685f31c246f5a86c46ed17c3a
I noticed one cleanup & one bugfix while looking into the huffman algorithm: