diff --git a/beacon_chain/spec/datatypes/base.nim b/beacon_chain/spec/datatypes/base.nim index 47f46f4da..40aab3d79 100644 --- a/beacon_chain/spec/datatypes/base.nim +++ b/beacon_chain/spec/datatypes/base.nim @@ -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] diff --git a/beacon_chain/spec/eth2_ssz_serialization.nim b/beacon_chain/spec/eth2_ssz_serialization.nim index 08be02a7f..47836f148 100644 --- a/beacon_chain/spec/eth2_ssz_serialization.nim +++ b/beacon_chain/spec/eth2_ssz_serialization.nim @@ -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)