Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

generator: ignores inline struct field declaration #188

Open
@oleg-ssvlabs

Description

@oleg-ssvlabs

Description

It appears thatsszgen ignores inline struct field declarations when generating encoders, causing marshalling/unmarshalling to omit all inline struct fields.

sszgen version0.1.3

Reproducible Sample Showcasing the Issue

Commands to Generate Encodings:

sszgen -path. --objs Foo -output foo_encoding.gosszgen -path. --objs Bar -output bar_encoding.go
typeFoostruct {Name,Address []byte//inline struct fields that are ignored}typeBarstruct {Name    []byteAddress []byte}funcmain() {f:=Foo{}fooBytes,err:=f.MarshalSSZ()iferr!=nil {panic(err)}fmt.Printf("Foo len: '%v'",len(fooBytes))b:=Bar{}barBytes,err:=b.MarshalSSZ()iferr!=nil {panic(err)}fmt.Printf("Bar len: '%v'",len(barBytes))}

Expected output:

Foo len: '8'Bar len: '8'

Actual output:

Foo len: '0'Bar len: '8'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp