prune base.nim
This commit is contained in:
parent
4f2e1be3f1
commit
fe775123b0
|
@ -30,18 +30,6 @@ type
|
|||
Gwei = uint64
|
||||
Ether = distinct uint64
|
||||
|
||||
template ethAmountUnit(typ: type) {.dirty.} =
|
||||
func `+`(x, y: typ): typ {.borrow.}
|
||||
func `-`(x, y: typ): typ {.borrow.}
|
||||
func `*`(x: typ, y: distinctBase(typ)): typ {.borrow.}
|
||||
func `*`(x: distinctBase(typ), y: typ): typ {.borrow.}
|
||||
|
||||
func `div`(x, y: typ): distinctBase(typ) {.borrow.}
|
||||
|
||||
func `<`(x, y: typ): bool {.borrow.}
|
||||
|
||||
ethAmountUnit Ether
|
||||
|
||||
type
|
||||
Eth2Domain = array[32, byte]
|
||||
|
||||
|
|
|
@ -5,13 +5,6 @@ import
|
|||
|
||||
export ssz_codec, ssz_serialization, eth2_merkleization
|
||||
|
||||
proc readAndUpdateRoot(
|
||||
data: openArray[byte], val: var auto, updateRoot = true
|
||||
) {.raises: [SszError].} =
|
||||
readSszValue(data, val)
|
||||
if updateRoot:
|
||||
val.root = hash_tree_root(val.message)
|
||||
|
||||
template readSszBytes*(
|
||||
data: openArray[byte], val: var auto, updateRoot: bool) =
|
||||
readSszValue(data, val)
|
||||
|
|
Loading…
Reference in New Issue