Skip to content

Conversation

@howjmay
Copy link
Member

@howjmay howjmay commented Sep 4, 2025

No description provided.

@howjmay howjmay force-pushed the parse-types branch 5 times, most recently from e16d79e to bd93e9c Compare September 4, 2025 03:40
@howjmay howjmay marked this pull request as draft September 4, 2025 03:56
@howjmay howjmay force-pushed the parse-types branch 6 times, most recently from edb9da2 to de2b89d Compare September 4, 2025 07:14
func TestBlockInfoMarshalling(t *testing.T) {
t.Run("v0", func(t *testing.T) {
const v0hex = "002a00000000b421501f01000000640000000000000000000000000000000100000000000000000000000000000001000000000000000000000000000000e80300000000000000000000000000009edb91da930100000000000000000000005c2605000000000000000000000000000000000000000000000000000000000000000000000000000000000000000204696f746104494f5441000004496f746104494f544104494f54410f687474703a2f2f696f74612e6f726709e0afdabfb6f592bd8a010a0008000200e807f403"
const v0hex = "002a00000000b421501f01000000640000000000000000000000000000000100000000000000000000000000000001000000000000000000000000000000e80300000000000000000000000000009edb91da930100000000000000000000005c2605000000000000000000000000000000000000000000000000000000000000000000000000000000000000000204696f746104494f54410004496f746104494f544104494f54410f687474703a2f2f696f74612e6f726709e0afdabfb6f592bd8a010a0008000200e807f403"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@howjmay
Copy link
Member Author

howjmay commented Sep 23, 2025

We need to add LegacyBlockInfo, and some other Legacy types to proceed this PR. Not sure whether it is worthy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant