fix: Fix resource type parsing for multi-subtypes#714
Draft
howjmay wants to merge 3 commits intoiotaledger:developfrom
Draft
fix: Fix resource type parsing for multi-subtypes#714howjmay wants to merge 3 commits intoiotaledger:developfrom
howjmay wants to merge 3 commits intoiotaledger:developfrom
Conversation
e16d79e to
bd93e9c
Compare
edb9da2 to
de2b89d
Compare
howjmay
commented
Sep 8, 2025
| func TestBlockInfoMarshalling(t *testing.T) { | ||
| t.Run("v0", func(t *testing.T) { | ||
| const v0hex = "002a00000000b421501f01000000640000000000000000000000000000000100000000000000000000000000000001000000000000000000000000000000e80300000000000000000000000000009edb91da930100000000000000000000005c2605000000000000000000000000000000000000000000000000000000000000000000000000000000000000000204696f746104494f5441000004496f746104494f544104494f54410f687474703a2f2f696f74612e6f726709e0afdabfb6f592bd8a010a0008000200e807f403" | ||
| const v0hex = "002a00000000b421501f01000000640000000000000000000000000000000100000000000000000000000000000001000000000000000000000000000000e80300000000000000000000000000009edb91da930100000000000000000000005c2605000000000000000000000000000000000000000000000000000000000000000000000000000000000000000204696f746104494f54410004496f746104494f544104494f54410f687474703a2f2f696f74612e6f726709e0afdabfb6f592bd8a010a0008000200e807f403" |
Member
Author
There was a problem hiding this comment.
We replace the two the two optional fields (SubType1, SubType1) into a single optional slice: SubTypes []*ResourceType.
This caused one extra byte in encoding. The extra byte is the byte to identify the length of an array
Member
Author
|
We need to add LegacyBlockInfo, and some other Legacy types to proceed this PR. Not sure whether it is worthy |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.