mirror of
https://github.com/status-im/nim-libp2p.git
synced 2025-02-03 08:34:49 +00:00
support interop testing
This commit is contained in:
parent
8078fec0f0
commit
543ebdbdf5
@ -46,7 +46,7 @@ install:
|
|||||||
|
|
||||||
# install and build go-libp2p-daemon
|
# install and build go-libp2p-daemon
|
||||||
- curl -O -L -s -S https://raw.githubusercontent.com/status-im/nimbus-build-system/master/scripts/build_p2pd.sh
|
- curl -O -L -s -S https://raw.githubusercontent.com/status-im/nimbus-build-system/master/scripts/build_p2pd.sh
|
||||||
- bash build_p2pd.sh p2pdCache v0.2.4
|
- bash build_p2pd.sh p2pdCache update
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- nimble install -y --depsOnly
|
- nimble install -y --depsOnly
|
||||||
|
@ -26,8 +26,8 @@ logScope:
|
|||||||
topics = "gossipsub"
|
topics = "gossipsub"
|
||||||
|
|
||||||
const
|
const
|
||||||
GossipSubCodec* = "/meshsub/1.0.0"
|
GossipSubCodec* = "/meshsub/1.1.0"
|
||||||
GossipSubCodec_11* = "/meshsub/1.1.0"
|
GossipSubCodec_10* = "/meshsub/1.0.0"
|
||||||
|
|
||||||
# overlay parameters
|
# overlay parameters
|
||||||
const
|
const
|
||||||
@ -132,8 +132,8 @@ method init*(g: GossipSub) =
|
|||||||
await g.handleConn(conn, proto)
|
await g.handleConn(conn, proto)
|
||||||
|
|
||||||
g.handler = handler
|
g.handler = handler
|
||||||
g.codecs &= GossipSubCodec_11
|
|
||||||
g.codecs &= GossipSubCodec
|
g.codecs &= GossipSubCodec
|
||||||
|
g.codecs &= GossipSubCodec_10
|
||||||
|
|
||||||
proc replenishFanout(g: GossipSub, topic: string) =
|
proc replenishFanout(g: GossipSub, topic: string) =
|
||||||
## get fanout peers for a topic
|
## get fanout peers for a topic
|
||||||
@ -336,7 +336,7 @@ method handleDisconnect*(g: GossipSub, peer: PubSubPeer) =
|
|||||||
method subscribePeer*(p: GossipSub,
|
method subscribePeer*(p: GossipSub,
|
||||||
conn: Connection) =
|
conn: Connection) =
|
||||||
procCall PubSub(p).subscribePeer(conn)
|
procCall PubSub(p).subscribePeer(conn)
|
||||||
asyncCheck p.handleConn(conn, GossipSubCodec_11)
|
asyncCheck p.handleConn(conn, GossipSubCodec)
|
||||||
|
|
||||||
method subscribeTopic*(g: GossipSub,
|
method subscribeTopic*(g: GossipSub,
|
||||||
topic: string,
|
topic: string,
|
||||||
|
@ -26,7 +26,8 @@ import ../libp2p/[daemon/daemonapi,
|
|||||||
transports/tcptransport,
|
transports/tcptransport,
|
||||||
protocols/secure/secure,
|
protocols/secure/secure,
|
||||||
protocols/pubsub/pubsub,
|
protocols/pubsub/pubsub,
|
||||||
protocols/pubsub/floodsub, gossipsub]
|
protocols/pubsub/floodsub,
|
||||||
|
protocols/pubsub/gossipsub]
|
||||||
|
|
||||||
type
|
type
|
||||||
# TODO: Unify both PeerInfo structs
|
# TODO: Unify both PeerInfo structs
|
||||||
|
Loading…
x
Reference in New Issue
Block a user