msgid formatting, libp2p bump (#2198)
* msgid formatting, libp2p bump * fix libp2p commit
This commit is contained in:
parent
3d87bc0033
commit
452042b17b
|
@ -1628,14 +1628,16 @@ proc addValidator*[MsgType](node: Eth2Node,
|
||||||
proc unsubscribe*(node: Eth2Node, topic: string): Future[void] =
|
proc unsubscribe*(node: Eth2Node, topic: string): Future[void] =
|
||||||
node.pubsub.unsubscribeAll(topic)
|
node.pubsub.unsubscribeAll(topic)
|
||||||
|
|
||||||
proc traceMessage(fut: FutureBase, msgId: string) =
|
proc traceMessage(fut: FutureBase, msgId: seq[byte]) =
|
||||||
fut.addCallback do (arg: pointer):
|
fut.addCallback do (arg: pointer):
|
||||||
if not(fut.failed):
|
if not(fut.failed):
|
||||||
trace "Outgoing pubsub message sent", msgId
|
trace "Outgoing pubsub message sent", msgId = byteutils.toHex(msgId)
|
||||||
elif fut.error != nil:
|
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:
|
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) =
|
proc broadcast*(node: Eth2Node, topic: string, msg: auto) =
|
||||||
let
|
let
|
||||||
|
@ -1648,4 +1650,4 @@ proc broadcast*(node: Eth2Node, topic: string, msg: auto) =
|
||||||
inc nbc_gossip_messages_sent
|
inc nbc_gossip_messages_sent
|
||||||
|
|
||||||
var futSnappy = node.pubsub.publish(topic & "_snappy", compressed)
|
var futSnappy = node.pubsub.publish(topic & "_snappy", compressed)
|
||||||
traceMessage(futSnappy, string.fromBytes(gossipId(uncompressed, true)))
|
traceMessage(futSnappy, gossipId(uncompressed, true))
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 9e5ba64c4888caa46938b2ef87e74c65cb7fab4b
|
Subproject commit a1a5f9abaca41ec37ea2c4d6b34b5c4fcecf7591
|
Loading…
Reference in New Issue