Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
p2p
go-p2p-kad-dht
Commits
b19ac720
Commit
b19ac720
authored
Dec 20, 2019
by
Aarsh Shah
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
routing table should not have all the peers
parent
a06b3276
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
dht_test.go
dht_test.go
+5
-1
No files found.
dht_test.go
View file @
b19ac720
...
...
@@ -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])
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment