nim-eth/tests/rlp
Kim De Mey 522db295f2
Fix RLP deserialzation for Enum with holes (#554)
RLP Enum deserialization would currently not check if "hole values"
were attempted to be converted to the enum type. Now use
checkedEnumAssign and fail with RlpTypeMismatch on invalid values.

There is at least one occurance of an enum with holes in rlpx p2p:
DisconnectionReason. For this enum the issue could occur.

Also:
- Added enum RLP tests and rlpx p2p disconnect message tests to
test the DisconnectionReason with enum hole value.
- Fixed worse custom DisconnectionReason decoding occurance
in rlpx in waitSingleMsg proc where this issue could occur.
2022-11-14 15:49:37 +01:00
..
cases actually, lets fix it in readAheadCheck 2019-06-07 16:11:33 +03:00
eip2718 implement eip2718: transaction type envelope 2021-05-15 08:18:08 +07:00
util CI: test with multiple Nim version (#429) 2021-12-11 19:12:55 +01:00
all_tests.nim port kvstore from nim-beacon-chain (#230) 2020-04-27 15:16:11 +02:00
test_api_usage.nim Fix RLP deserialzation for Enum with holes (#554) 2022-11-14 15:49:37 +01:00
test_common.nim CI: test with multiple Nim version (#429) 2021-12-11 19:12:55 +01:00
test_json_suite.nim Add build_dcli target and add it to CI (#344) 2021-04-06 13:33:24 +02:00
test_object_serialization.nim CI: test with multiple Nim version (#429) 2021-12-11 19:12:55 +01:00