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
dms3
go-dms3-routing
Commits
3745c327
Commit
3745c327
authored
Aug 28, 2014
by
Jeromy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixing up some bitswap stuff after the PR
parent
1ecb7eda
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
dht/dht.go
dht/dht.go
+2
-2
kbucket/table_test.go
kbucket/table_test.go
+1
-1
No files found.
dht/dht.go
View file @
3745c327
...
...
@@ -49,7 +49,7 @@ type IpfsDHT struct {
diaglock
sync
.
Mutex
// listener is a server to register to listen for responses to messages
listener
*
swarm
.
MesListener
listener
*
swarm
.
Mes
sage
Listener
}
// NewDHT creates a new DHT object with the given peer as the 'local' host
...
...
@@ -66,7 +66,7 @@ func NewDHT(p *peer.Peer, net swarm.Network, dstore ds.Datastore) *IpfsDHT {
dht
.
routingTables
[
0
]
=
kb
.
NewRoutingTable
(
20
,
kb
.
ConvertPeerID
(
p
.
ID
),
time
.
Millisecond
*
30
)
dht
.
routingTables
[
1
]
=
kb
.
NewRoutingTable
(
20
,
kb
.
ConvertPeerID
(
p
.
ID
),
time
.
Millisecond
*
100
)
dht
.
routingTables
[
2
]
=
kb
.
NewRoutingTable
(
20
,
kb
.
ConvertPeerID
(
p
.
ID
),
time
.
Hour
)
dht
.
listener
=
swarm
.
NewMesListener
()
dht
.
listener
=
swarm
.
NewMes
sage
Listener
()
dht
.
birth
=
time
.
Now
()
return
dht
}
...
...
kbucket/table_test.go
View file @
3745c327
...
...
@@ -78,7 +78,7 @@ func TestTableUpdate(t *testing.T) {
for
i
:=
0
;
i
<
10000
;
i
++
{
p
:=
rt
.
Update
(
peers
[
rand
.
Intn
(
len
(
peers
))])
if
p
!=
nil
{
t
.
Log
(
"evicted peer."
)
//
t.Log("evicted peer.")
}
}
...
...
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