2022-05-13 16:30:10 +00:00
|
|
|
# Nimbus - Rapidly converge on and track the canonical chain head of each peer
|
|
|
|
#
|
|
|
|
# Copyright (c) 2021 Status Research & Development GmbH
|
|
|
|
# Licensed under either of
|
|
|
|
# * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or
|
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0)
|
|
|
|
# * MIT license ([LICENSE-MIT](LICENSE-MIT) or
|
|
|
|
# http://opensource.org/licenses/MIT)
|
|
|
|
# at your option. This file may not be copied, modified, or distributed
|
|
|
|
# except according to those terms.
|
|
|
|
|
2022-05-17 11:09:49 +00:00
|
|
|
template traceRecvReceived*(msg: static[string], args: varargs[untyped]) =
|
2022-05-13 16:30:10 +00:00
|
|
|
tracePacket "<< " & prettySnapProtoName & " Received " & msg,
|
|
|
|
`args`
|
|
|
|
|
2022-05-17 11:09:49 +00:00
|
|
|
template traceRecvGot*(msg: static[string], args: varargs[untyped]) =
|
2022-05-13 16:30:10 +00:00
|
|
|
tracePacket "<< " & prettySnapProtoName & " Got " & msg,
|
|
|
|
`args`
|
|
|
|
|
2022-05-17 11:09:49 +00:00
|
|
|
template traceRecvProtocolViolation*(msg: static[string], args: varargs[untyped]) =
|
2022-05-13 16:30:10 +00:00
|
|
|
tracePacketError "<< " & prettySnapProtoName & " Protocol violation, " & msg,
|
|
|
|
`args`
|
|
|
|
|
|
|
|
template traceRecvError*(msg: static[string], args: varargs[untyped]) =
|
|
|
|
traceNetworkError "<< " & prettySnapProtoName & " Error " & msg,
|
|
|
|
`args`
|
|
|
|
|
2022-05-17 11:09:49 +00:00
|
|
|
template traceRecvTimeoutWaiting*(msg: static[string], args: varargs[untyped]) =
|
2022-05-13 16:30:10 +00:00
|
|
|
traceTimeout "<< " & prettySnapProtoName & " Timeout waiting " & msg,
|
|
|
|
`args`
|
|
|
|
|
2022-05-17 11:09:49 +00:00
|
|
|
template traceSendSending*(msg: static[string], args: varargs[untyped]) =
|
2022-05-13 16:30:10 +00:00
|
|
|
tracePacket ">> " & prettySnapProtoName & " Sending " & msg,
|
|
|
|
`args`
|
|
|
|
|
2022-05-17 11:09:49 +00:00
|
|
|
template traceSendReplying*(msg: static[string], args: varargs[untyped]) =
|
2022-05-13 16:30:10 +00:00
|
|
|
tracePacket ">> " & prettySnapProtoName & " Replying " & msg,
|
|
|
|
`args`
|
|
|
|
|
|
|
|
# End
|