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
Commits
8adda0ff
Commit
8adda0ff
authored
Dec 23, 2014
by
Juan Batiz-Benet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dht: bootstrap query constants
parent
e630ca60
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
routing/dht/dht.go
routing/dht/dht.go
+5
-1
No files found.
routing/dht/dht.go
View file @
8adda0ff
...
...
@@ -28,6 +28,10 @@ var log = eventlog.Logger("dht")
const
doPinging
=
false
// NumBootstrapQueries defines the number of random dht queries to do to
// collect members of the routing table.
const
NumBootstrapQueries
=
5
// TODO. SEE https://github.com/jbenet/node-ipfs/blob/master/submodules/ipfs-dht/index.js
// IpfsDHT is an implementation of Kademlia with Coral and S/Kademlia modifications.
...
...
@@ -364,7 +368,7 @@ func (dht *IpfsDHT) PingRoutine(t time.Duration) {
func
(
dht
*
IpfsDHT
)
Bootstrap
(
ctx
context
.
Context
)
{
var
wg
sync
.
WaitGroup
for
i
:=
0
;
i
<
10
;
i
++
{
for
i
:=
0
;
i
<
NumBootstrapQueries
;
i
++
{
wg
.
Add
(
1
)
go
func
()
{
defer
wg
.
Done
()
...
...
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