bump libp2p (#1721)

gossipsub 1.1 can be enabled with -d:nbc_gossipsub_11
This commit is contained in:
Jacek Sieka 2020-09-22 19:34:34 +02:00 committed by GitHub
parent 73724b2c4b
commit e1c177cdd1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 3 deletions

View File

@ -15,7 +15,7 @@ import
multiaddress, multicodec, crypto/crypto, crypto/secp,
protocols/identify, protocols/protocol],
libp2p/protocols/secure/[secure, secio],
libp2p/protocols/pubsub/[pubsub, floodsub, gossipsub, rpc/message, rpc/messages],
libp2p/protocols/pubsub/[pubsub, rpc/message, rpc/messages],
libp2p/transports/tcptransport,
libp2p/stream/connection,
eth/[keys, async_utils], eth/p2p/p2p_protocol_dsl,
@ -25,6 +25,11 @@ import
ssz/ssz_serialization,
peer_pool, spec/[datatypes, network], ./time
when defined(nbc_gossipsub_11):
import libp2p/protocols/pubsub/gossipsub
else:
import libp2p/protocols/pubsub/gossipsub10
when chronicles.enabledLogLevel == LogLevel.TRACE:
import std/sequtils
@ -1104,7 +1109,7 @@ proc p2pProtocolBackendImpl*(p: P2PProtocol): Backend =
`MsgStrongRecName`)
mount `networkVar`.switch,
LPProtocol(codec: `codecNameLit` & "ssz_snappy",
LPProtocol(codecs: @[`codecNameLit` & "ssz_snappy"],
handler: snappyThunk)
##

2
vendor/nim-libp2p vendored

@ -1 +1 @@
Subproject commit b7e5d1122ce3dd5140788165ed86ebcb0a6002d8
Subproject commit 471e5906f66bd7af7e75d940042a34ead63caf7f