mirror of
https://github.com/vacp2p/nim-libp2p.git
synced 2025-03-04 01:50:36 +00:00
fix CI
This commit is contained in:
parent
901f55c680
commit
ebe342c766
@ -40,19 +40,19 @@ proc main() {.async.} =
|
|||||||
swSrc = createCircuitRelaySwitch(clSrc)
|
swSrc = createCircuitRelaySwitch(clSrc)
|
||||||
swDst = createCircuitRelaySwitch(clDst)
|
swDst = createCircuitRelaySwitch(clDst)
|
||||||
|
|
||||||
# Create a relay address to swDst using swRel as the relay
|
|
||||||
addrs = MultiAddress.init($swRel.peerInfo.addrs[0] & "/p2p/" &
|
|
||||||
$swRel.peerInfo.peerId & "/p2p-circuit/p2p/" &
|
|
||||||
$swDst.peerInfo.peerId).get()
|
|
||||||
|
|
||||||
swDst.mount(proto)
|
swDst.mount(proto)
|
||||||
|
|
||||||
await swRel.start()
|
await swRel.start()
|
||||||
await swSrc.start()
|
await swSrc.start()
|
||||||
await swDst.start()
|
await swDst.start()
|
||||||
|
|
||||||
# Connect both Src and Dst to the relay, but not to each other.
|
let
|
||||||
await swSrc.connect(swRel.peerInfo.peerId, swRel.peerInfo.addrs)
|
# Create a relay address to swDst using swRel as the relay
|
||||||
|
addrs = MultiAddress.init($swRel.peerInfo.addrs[0] & "/p2p/" &
|
||||||
|
$swRel.peerInfo.peerId & "/p2p-circuit/p2p/" &
|
||||||
|
$swDst.peerInfo.peerId).get()
|
||||||
|
|
||||||
|
# Connect Dst to the relay
|
||||||
await swDst.connect(swRel.peerInfo.peerId, swRel.peerInfo.addrs)
|
await swDst.connect(swRel.peerInfo.peerId, swRel.peerInfo.addrs)
|
||||||
|
|
||||||
# Dst reserve a slot on the relay.
|
# Dst reserve a slot on the relay.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user