mirror of
https://github.com/status-im/nim-eth.git
synced 2025-02-06 03:13:26 +00:00
A first step in cleaning up RLP, which has lots of interesting issues - the next step would be to clean up the exception handling as well (Resultify?) * remove `RlpNode` (unused) * single-pass parsing for most functionality via RlpItem * stricter conformance to spec * remove float support * warn about signed integers * raise on invalid RLP earlier * avoid several pointless allocations, in particular in `listLen`, `listElem` etc * include spec docs
9 lines
273 B
Nim
9 lines
273 B
Nim
const
|
|
BLOB_START_MARKER* = byte(0x80)
|
|
LIST_START_MARKER* = byte(0xc0)
|
|
|
|
THRESHOLD_LIST_LEN* = 56
|
|
|
|
LEN_PREFIXED_BLOB_MARKER* = byte(BLOB_START_MARKER + THRESHOLD_LIST_LEN - 1) # 183
|
|
LEN_PREFIXED_LIST_MARKER* = byte(LIST_START_MARKER + THRESHOLD_LIST_LEN - 1) # 247
|