Commit b19ac720 authored by Aarsh Shah's avatar Aarsh Shah

routing table should not have all the peers

parent a06b3276
......@@ -805,7 +805,7 @@ func TestEmptyTable(t *testing.T) {
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
nDHTs := 50 // needs more than 40 peers so we don't add all of them to our routing table.
nDHTs := 50
dhts := setupDHTS(t, ctx, nDHTs)
defer func() {
for _, dht := range dhts {
......@@ -837,6 +837,10 @@ func TestEmptyTable(t *testing.T) {
oldSize = newSize
}
// remove any one peer from the RT so we don't end up disconnecting all of them if the RT
// already has all peers we are connected to
dhts[0].routingTable.Remove(dhts[0].routingTable.ListPeers()[0])
if u.Debug {
printRoutingTables(dhts[:1])
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment