mirror of
https://github.com/fluencelabs/go-libp2p-kad-dht
synced 2025-07-31 20:12:00 +00:00
New node methods for tools and otherwise (#265)
* Add IpfsDHT.{Bootstrap{Random,Self},Peer{Id,Key}} * Include client mode tests, support for Ping, and uncruft setupDHTs * Include xerrors in deps
This commit is contained in:
@@ -170,3 +170,12 @@ func (dht *IpfsDHT) runBootstrap(ctx context.Context, cfg BootstrapConfig) error
|
||||
return err
|
||||
})
|
||||
}
|
||||
|
||||
func (dht *IpfsDHT) BootstrapRandom(ctx context.Context) error {
|
||||
return dht.randomWalk(ctx)
|
||||
}
|
||||
|
||||
func (dht *IpfsDHT) BootstrapSelf(ctx context.Context) error {
|
||||
_, err := dht.walk(ctx, dht.self)
|
||||
return err
|
||||
}
|
||||
|
Reference in New Issue
Block a user