ssz no longer uses stew/bitseqs

This commit is contained in:
Jacek Sieka 2020-06-03 11:21:44 +02:00
parent b9e847a143
commit 86ac01122c
No known key found for this signature in database
GPG Key ID: A1B09461ABB656B8
2 changed files with 7 additions and 0 deletions

View File

@ -1,3 +1,5 @@
{.push raises: [Defect].}
import
bitops2, ptrops
@ -7,6 +9,9 @@ type
BitSeq* = distinct Bytes
## TODO
##
## Update: the SSZ module has its own bitseq now - this bitseq can be
## reimplemented to use any in-memory representation it deems convenient
##
## The current design of BitSeq tries to follow precisely
## the bitwise representation of the SSZ bitlists.
## This is a relatively compact representation, but as

View File

@ -17,6 +17,8 @@
# Note that `ByteAddress` in stdlib is implemented as a signed integer and
# might lead to overflow on arithmetic - avoid
{.push raises: [].}
template offset*(p: pointer, bytes: int): pointer =
## Offset a memory address by a number of bytes. Behavior is undefined on
## overflow.