mirror of https://github.com/status-im/nim-eth.git
Add capability-id and context-id rlp list in header-data for Parity compatibility
This commit is contained in:
parent
934a247c23
commit
325d120274
|
@ -141,6 +141,13 @@ proc encryptMsg*(msg: openarray[byte], secrets: var SecretState): seq[byte] =
|
|||
header[1] = byte((msg.len shr 8) and 0xFF)
|
||||
header[2] = byte(msg.len and 0xFF)
|
||||
|
||||
# This is the [capability-id, context-id] in header-data
|
||||
# While not really used, this is checked in the Parity client.
|
||||
# Same as rlp.encode((0, 0))
|
||||
header[3] = 0xc2
|
||||
header[4] = 0x80
|
||||
header[5] = 0x80
|
||||
|
||||
# XXX:
|
||||
# This would be safer if we use a thread-local sequ for the temporary buffer
|
||||
result = newSeq[byte](encryptedLength(msg.len))
|
||||
|
|
Loading…
Reference in New Issue