Skip to content

Commit

Permalink
schema: add GetDecodedFields method
Browse files Browse the repository at this point in the history
  • Loading branch information
dcentelles committed Mar 27, 2023
1 parent 8762377 commit a7c2e1f
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,15 @@ func (s *StateSchema) GetFields() []*StateField {
return fieldsCopy
}

func (s *StateSchema) GetDecodedFields() []*DecodedStateField {
fieldsCopy := make([]*DecodedStateField, 0, len(s.decodedFields))
for _, field := range s.decodedFields {
fieldCopy := field
fieldsCopy = append(fieldsCopy, &fieldCopy)
}
return fieldsCopy
}

func (s *StateSchema) GetBitSize() int {
return s.fieldsBitSize
}
Expand Down

0 comments on commit a7c2e1f

Please sign in to comment.