conditional enable gossip11 module
This commit is contained in:
parent
be0375f840
commit
028b390c7f
|
@ -9,9 +9,14 @@ import
|
|||
crypto/crypto, transports/[transport, tcptransport],
|
||||
muxers/[muxer, mplex/mplex, mplex/types],
|
||||
protocols/[identify, secure/secure],
|
||||
protocols/pubsub/[pubsub, gossipsub, floodsub],
|
||||
protocols/pubsub/[pubsub, floodsub],
|
||||
protocols/pubsub/rpc/message
|
||||
|
||||
when not defined(gossip11):
|
||||
import protocols/pubsub/gossipsub
|
||||
else:
|
||||
import protocols/pubsub/gossipsub11
|
||||
|
||||
import
|
||||
protocols/secure/noise,
|
||||
protocols/secure/secio
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
include ../../libp2p/protocols/pubsub/gossipsub
|
||||
when not defined(gossip11):
|
||||
include ../../libp2p/protocols/pubsub/gossipsub
|
||||
else:
|
||||
include ../../libp2p/protocols/pubsub/gossipsub11
|
||||
|
||||
{.used.}
|
||||
|
||||
|
|
|
@ -19,9 +19,13 @@ import utils, ../../libp2p/[errors,
|
|||
crypto/crypto,
|
||||
stream/bufferstream,
|
||||
protocols/pubsub/pubsub,
|
||||
protocols/pubsub/gossipsub,
|
||||
protocols/pubsub/rpc/messages]
|
||||
|
||||
when not defined(gossip11):
|
||||
import ../../libp2p/protocols/pubsub/gossipsub
|
||||
else:
|
||||
import ../../libp2p/protocols/pubsub/gossipsub11
|
||||
|
||||
import ../helpers
|
||||
|
||||
proc waitSub(sender, receiver: auto; key: string) {.async, gcsafe.} =
|
||||
|
|
|
@ -26,9 +26,13 @@ import ../libp2p/[daemon/daemonapi,
|
|||
transports/tcptransport,
|
||||
protocols/secure/secure,
|
||||
protocols/pubsub/pubsub,
|
||||
protocols/pubsub/gossipsub,
|
||||
protocols/pubsub/floodsub]
|
||||
|
||||
when not defined(gossip11):
|
||||
import ../libp2p/protocols/pubsub/gossipsub
|
||||
else:
|
||||
import ../libp2p/protocols/pubsub/gossipsub11
|
||||
|
||||
type
|
||||
# TODO: Unify both PeerInfo structs
|
||||
NativePeerInfo = peerinfo.PeerInfo
|
||||
|
|
Loading…
Reference in New Issue