Skip to content

Commit

Permalink
Add comments for codec entry includeDiscriminator option
Browse files Browse the repository at this point in the history
  • Loading branch information
ilija42 committed Dec 18, 2024
1 parent 5328645 commit aa89442
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions pkg/solana/codec/codec_entry.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,13 @@ type Entry interface {

type entry struct {
// TODO this might not be needed in the end, it was handy to make tests simpler
offchainName string
onchainName string
reflectType reflect.Type
typeCodec commonencodings.TypeCodec
mod codec.Modifier
offchainName string
onchainName string
reflectType reflect.Type
typeCodec commonencodings.TypeCodec
mod codec.Modifier
// includeDiscriminator during Encode adds a discriminator to the encoded bytes under an assumption that the provided value didn't have a discriminator.
// During Decode includeDiscriminator removes discriminator from bytes under an assumption that the provided struct doesn't need a discriminator.
includeDiscriminator bool
}

Expand Down

0 comments on commit aa89442

Please sign in to comment.