mirror of
https://github.com/status-im/nim-libp2p.git
synced 2025-01-11 21:44:24 +00:00
conditional enable gossip11 module
This commit is contained in:
parent
be0375f840
commit
028b390c7f
@ -9,9 +9,14 @@ import
|
|||||||
crypto/crypto, transports/[transport, tcptransport],
|
crypto/crypto, transports/[transport, tcptransport],
|
||||||
muxers/[muxer, mplex/mplex, mplex/types],
|
muxers/[muxer, mplex/mplex, mplex/types],
|
||||||
protocols/[identify, secure/secure],
|
protocols/[identify, secure/secure],
|
||||||
protocols/pubsub/[pubsub, gossipsub, floodsub],
|
protocols/pubsub/[pubsub, floodsub],
|
||||||
protocols/pubsub/rpc/message
|
protocols/pubsub/rpc/message
|
||||||
|
|
||||||
|
when not defined(gossip11):
|
||||||
|
import protocols/pubsub/gossipsub
|
||||||
|
else:
|
||||||
|
import protocols/pubsub/gossipsub11
|
||||||
|
|
||||||
import
|
import
|
||||||
protocols/secure/noise,
|
protocols/secure/noise,
|
||||||
protocols/secure/secio
|
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.}
|
{.used.}
|
||||||
|
|
||||||
|
@ -19,9 +19,13 @@ import utils, ../../libp2p/[errors,
|
|||||||
crypto/crypto,
|
crypto/crypto,
|
||||||
stream/bufferstream,
|
stream/bufferstream,
|
||||||
protocols/pubsub/pubsub,
|
protocols/pubsub/pubsub,
|
||||||
protocols/pubsub/gossipsub,
|
|
||||||
protocols/pubsub/rpc/messages]
|
protocols/pubsub/rpc/messages]
|
||||||
|
|
||||||
|
when not defined(gossip11):
|
||||||
|
import ../../libp2p/protocols/pubsub/gossipsub
|
||||||
|
else:
|
||||||
|
import ../../libp2p/protocols/pubsub/gossipsub11
|
||||||
|
|
||||||
import ../helpers
|
import ../helpers
|
||||||
|
|
||||||
proc waitSub(sender, receiver: auto; key: string) {.async, gcsafe.} =
|
proc waitSub(sender, receiver: auto; key: string) {.async, gcsafe.} =
|
||||||
|
@ -26,9 +26,13 @@ import ../libp2p/[daemon/daemonapi,
|
|||||||
transports/tcptransport,
|
transports/tcptransport,
|
||||||
protocols/secure/secure,
|
protocols/secure/secure,
|
||||||
protocols/pubsub/pubsub,
|
protocols/pubsub/pubsub,
|
||||||
protocols/pubsub/gossipsub,
|
|
||||||
protocols/pubsub/floodsub]
|
protocols/pubsub/floodsub]
|
||||||
|
|
||||||
|
when not defined(gossip11):
|
||||||
|
import ../libp2p/protocols/pubsub/gossipsub
|
||||||
|
else:
|
||||||
|
import ../libp2p/protocols/pubsub/gossipsub11
|
||||||
|
|
||||||
type
|
type
|
||||||
# TODO: Unify both PeerInfo structs
|
# TODO: Unify both PeerInfo structs
|
||||||
NativePeerInfo = peerinfo.PeerInfo
|
NativePeerInfo = peerinfo.PeerInfo
|
||||||
|
Loading…
x
Reference in New Issue
Block a user