Bump nim-ssz-serialization and clean-up fromSszBytes raises (#948)
This commit is contained in:
parent
a8fdf8ec36
commit
ac1196d915
|
@ -118,9 +118,7 @@ template toSszType*(x: UInt256): array[32, byte] =
|
||||||
toBytesLE(x)
|
toBytesLE(x)
|
||||||
|
|
||||||
func fromSszBytes*(T: type UInt256, data: openArray[byte]):
|
func fromSszBytes*(T: type UInt256, data: openArray[byte]):
|
||||||
# TODO: These two SSZ Errors (order matters ugh!) is because of raisesssz
|
T {.raises: [Defect, MalformedSszError].} =
|
||||||
# pragma on raiseIncorrectSize(). Need to fix that there.
|
|
||||||
T {.raises: [Defect, MalformedSszError, SszSizeMismatchError].} =
|
|
||||||
if data.len != sizeof(result):
|
if data.len != sizeof(result):
|
||||||
raiseIncorrectSize T
|
raiseIncorrectSize T
|
||||||
|
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 877528f526eaf18e9f74e52202f1028786c0003d
|
Subproject commit cd500484e054ead951f2d07aeb81c1c8c695db26
|
Loading…
Reference in New Issue