We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HashTreeRootWith
sszgen version: 0.1.3 system: macos with m chip go version: go1.23.1 darwin/arm64
Below is the struct
type ClientInfoAndCapabilitiesPayload struct { ClientInfo []byte `ssz-max:"200"` DataRadius []byte `ssz-size:"32"` Capabilities []uint16 `ssz-max:"400"` }
generated method, there is no AppendUint16 method. There are AppendUint8 AppendUint32 AppendUint64, why no AppendUint16?
AppendUint16
AppendUint8 AppendUint32 AppendUint64
// HashTreeRootWith ssz hashes the ClientInfoAndCapabilitiesPayload object with a hasher func (c *ClientInfoAndCapabilitiesPayload) HashTreeRootWith(hh ssz.HashWalker) (err error) { indx := hh.Index() // Field (0) 'ClientInfo' { elemIndx := hh.Index() byteLen := uint64(len(c.ClientInfo)) if byteLen > 200 { err = ssz.ErrIncorrectListSize return } hh.Append(c.ClientInfo) hh.MerkleizeWithMixin(elemIndx, byteLen, (200+31)/32) } // Field (1) 'DataRadius' if size := len(c.DataRadius); size != 32 { err = ssz.ErrBytesLengthFn("ClientInfoAndCapabilitiesPayload.DataRadius", size, 32) return } hh.PutBytes(c.DataRadius) // Field (2) 'Capabilities' { if size := len(c.Capabilities); size > 400 { err = ssz.ErrListTooBigFn("ClientInfoAndCapabilitiesPayload.Capabilities", size, 400) return } subIndx := hh.Index() for _, i := range c.Capabilities { hh.AppendUint16(i) // no AppendUint16 } hh.FillUpTo32() numItems := uint64(len(c.Capabilities)) hh.MerkleizeWithMixin(subIndx, numItems, ssz.CalculateLimit(400, numItems, 2)) } hh.Merkleize(indx) return }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
sszgen version: 0.1.3
system: macos with m chip
go version: go1.23.1 darwin/arm64
Below is the struct
generated method, there is no
AppendUint16
method. There areAppendUint8 AppendUint32 AppendUint64
, why noAppendUint16
?The text was updated successfully, but these errors were encountered: