Skip to content

Commit

Permalink
Fix createSlice for reference type
Browse files Browse the repository at this point in the history
The problem was found when trying to serialize field `v []Uint256`, where
Uint256 is a struct with SSZ interface.
  • Loading branch information
shermike committed Jun 19, 2024
1 parent 4843cd9 commit 6bd16be
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sszgen/generator/unmarshal.go
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ func (v *Value) createSlice(useNumVariable bool) string {
// []int uses the Extend functions in the fastssz package
return fmt.Sprintf("::.%s = ssz.Extend%s(::.%s, %s)", v.name, uintVToName(v.e), v.name, size)

case TypeContainer:
case TypeContainer, TypeReference:
// []*(ref.)Struct{}
ptr := "*"
if v.e.noPtr {
Expand Down

0 comments on commit 6bd16be

Please sign in to comment.