Files
prysm/encoding/ssz/query/bitvector.go
Jun Song 4eab41ea4c SSZ-QL: use fastssz-generated SizeSSZ method & clarify Size method (#15864)
* Add SizeSSZ as a member of SSZObject

* Temporarily rename dereferencePointer function

* Fix analyzeType: use reflect.Value for analyzing

* Fix PopulateVariableLengthInfo: change function signature & reset pointer

* Remove Container arm for Size function as it'll be handled in the previous branch

* Remove OffsetBytes function in listInfo

* Refactor and document codes

* Remove misleading "fixedSize" concept & Add Uint8...64 SSZTypes

* Add size testing

* Move TestSSZObject_Batch and rename it as TestHashTreeRoot

* Changelog :)

* Rename endOffset to fixedOffset

---------

Co-authored-by: Radosław Kapka <rkapka@wp.pl>
2025-10-14 17:33:52 +00:00

25 lines
385 B
Go

package query
// bitvectorInfo holds information about a SSZ Bitvector type.
type bitvectorInfo struct {
// length is the fixed length of bits of the Bitvector.
length uint64
}
func (v *bitvectorInfo) Length() uint64 {
if v == nil {
return 0
}
return v.length
}
func (v *bitvectorInfo) Size() uint64 {
if v == nil {
return 0
}
// Size in bytes.
return v.length / 8
}