don't trace the payload

This commit is contained in:
Dmitriy Ryajov 2020-03-11 17:04:40 -06:00
parent 5c234f704d
commit 761b221b75
1 changed files with 2 additions and 2 deletions

View File

@ -58,7 +58,7 @@ proc readMsg*(conn: Connection): Future[Msg] {.async, gcsafe.} =
var data: seq[byte] = newSeq[byte](dataLenVarint.int) var data: seq[byte] = newSeq[byte](dataLenVarint.int)
if dataLenVarint.int > 0: if dataLenVarint.int > 0:
await conn.readExactly(addr data[0], dataLenVarint.int) await conn.readExactly(addr data[0], dataLenVarint.int)
trace "read data", data = data trace "read data", data = data.len
let header = headerVarint let header = headerVarint
result = (header shr 3, MessageType(header and 0x7), data) result = (header shr 3, MessageType(header and 0x7), data)
@ -69,7 +69,7 @@ proc writeMsg*(conn: Connection,
data: seq[byte] = @[]) {.async, gcsafe.} = data: seq[byte] = @[]) {.async, gcsafe.} =
trace "seding data over mplex", id, trace "seding data over mplex", id,
msgType, msgType,
data data = data.len
## write lenght prefixed ## write lenght prefixed
var buf = initVBuffer() var buf = initVBuffer()
buf.writePBVarint(id shl 3 or ord(msgType).uint) buf.writePBVarint(id shl 3 or ord(msgType).uint)