From 452042b17bc3e94737195011ad128fa23f7bafb2 Mon Sep 17 00:00:00 2001 From: Jacek Sieka Date: Fri, 18 Dec 2020 19:45:27 +0100 Subject: [PATCH] msgid formatting, libp2p bump (#2198) * msgid formatting, libp2p bump * fix libp2p commit --- beacon_chain/eth2_network.nim | 12 +++++++----- vendor/nim-libp2p | 2 +- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/beacon_chain/eth2_network.nim b/beacon_chain/eth2_network.nim index 62c22cc44..9dcf56e30 100644 --- a/beacon_chain/eth2_network.nim +++ b/beacon_chain/eth2_network.nim @@ -1628,14 +1628,16 @@ proc addValidator*[MsgType](node: Eth2Node, proc unsubscribe*(node: Eth2Node, topic: string): Future[void] = node.pubsub.unsubscribeAll(topic) -proc traceMessage(fut: FutureBase, msgId: string) = +proc traceMessage(fut: FutureBase, msgId: seq[byte]) = fut.addCallback do (arg: pointer): if not(fut.failed): - trace "Outgoing pubsub message sent", msgId + trace "Outgoing pubsub message sent", msgId = byteutils.toHex(msgId) elif fut.error != nil: - debug "Gossip message not sent", msgId, err = fut.error.msg + debug "Gossip message not sent", + msgId = byteutils.toHex(msgId), err = fut.error.msg else: - debug "Unexpected future state for gossip", msgId, state = fut.state + debug "Unexpected future state for gossip", + msgId = byteutils.toHex(msgId), state = fut.state proc broadcast*(node: Eth2Node, topic: string, msg: auto) = let @@ -1648,4 +1650,4 @@ proc broadcast*(node: Eth2Node, topic: string, msg: auto) = inc nbc_gossip_messages_sent var futSnappy = node.pubsub.publish(topic & "_snappy", compressed) - traceMessage(futSnappy, string.fromBytes(gossipId(uncompressed, true))) + traceMessage(futSnappy, gossipId(uncompressed, true)) diff --git a/vendor/nim-libp2p b/vendor/nim-libp2p index 9e5ba64c4..a1a5f9aba 160000 --- a/vendor/nim-libp2p +++ b/vendor/nim-libp2p @@ -1 +1 @@ -Subproject commit 9e5ba64c4888caa46938b2ef87e74c65cb7fab4b +Subproject commit a1a5f9abaca41ec37ea2c4d6b34b5c4fcecf7591