Skip to content
Discussion options

You must be logged in to vote

Thanks for the unit test! It makes it easy to see what's going on.

Flaw::TruncatedField is produced when a tag is not followed by a value, i.e., when a tag other than the body tag is the last value in the &[u128] payload:

      let Some(&value) = payload.get(i + 1) else {
        flaw.get_or_insert(Flaw::TruncatedField);
        break;
      };

The docs refer to a different issue:

If a LEB128 varint contains more than 18 bytes, would overflow a u128, or is truncated,
meaning that the end of the payload buffer is reached before encountering a byte with
the continuation bit not set, the decoded runestone is a cenotaph with no etching, mint,
or edicts.

This is referring to Flaw::Varint, wh…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@ASuciuX
Comment options

Answer selected by casey
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants