1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-06-30 09:59:13 +08:00

mark other nodes in routing table on test-connect

License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
This commit is contained in:
Jeromy
2015-07-17 17:28:44 -07:00
parent 8668f40915
commit 4780c65171

View File

@ -78,6 +78,14 @@ func connect(t *testing.T, ctx context.Context, a, b *IpfsDHT) {
if err := a.host.Connect(ctx, pi); err != nil {
t.Fatal(err)
}
for a.routingTable.Find(b.self) == "" {
time.Sleep(time.Millisecond * 5)
}
for b.routingTable.Find(a.self) == "" {
time.Sleep(time.Millisecond * 5)
}
}
func bootstrap(t *testing.T, ctx context.Context, dhts []*IpfsDHT) {