Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

Relay Example error #178

Closed
xiaokugua250 opened this issue May 19, 2020 · 2 comments
Closed

Relay Example error #178

xiaokugua250 opened this issue May 19, 2020 · 2 comments

Comments

@xiaokugua250
Copy link

xiaokugua250 commented May 19, 2020

when i run relay example in https://github.com/libp2p/go-libp2p-examples/tree/master/relay i get two errors

  1. h1, err := libp2p.New(context.Background(), libp2p.EnableRelay(circuit.OptDiscovery)) error is
    circuit.OptDiscovery is now a no-op: dialing peers with a random relay is no longer supported
  2. relayaddr, err := ma.NewMultiaddr("/p2p-circuit/p2p/"+ h3.ID().Pretty()) report an't dial a p2p-circuit without specifying a relay: /p2p-circuit/p2p/QmPTjoYNMLSR8wzeRToMCwokMqCjz1TwBTdbJq7nX4TsWN
    image

so how to use the libp2p-circuit ? or any other examples?
final i get these fixed by set
relayaddr, err := ma.NewMultiaddr("/p2p/"+h2.ID().Pretty()+"/p2p-circuit/p2p/"+ h3.ID().Pretty())

@xiaokugua250
Copy link
Author

but when i write my own relay code and run it in 3 terminal i got error like this
length greater than remaining number of bytes in buffer
i dont know how to fix it ,
which raw code is in https://github.com/multiformats/multihash
image

@xiaokugua250
Copy link
Author

d

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant