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
efe932a2
Commit
efe932a2
authored
May 20, 2015
by
Tommi Virtanen
Committed by
Jeromy
Jan 12, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fsrepo: Refactor to extract datastore internals
License: MIT Signed-off-by:
Tommi Virtanen
<
tv@eagain.net
>
parent
bc9ceab8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
dht.go
dht.go
+2
-2
No files found.
dht.go
View file @
efe932a2
...
...
@@ -44,7 +44,7 @@ type IpfsDHT struct {
self
peer
.
ID
// Local peer (yourself)
peerstore
peer
.
Peerstore
// Peer Registry
datastore
ds
.
ThreadSafe
Datastore
// Local data
datastore
ds
.
Datastore
// Local data
routingTable
*
kb
.
RoutingTable
// Array of routing tables for differently distanced nodes
providers
*
ProviderManager
...
...
@@ -60,7 +60,7 @@ type IpfsDHT struct {
}
// NewDHT creates a new DHT object with the given peer as the 'local' host
func
NewDHT
(
ctx
context
.
Context
,
h
host
.
Host
,
dstore
ds
.
ThreadSafe
Datastore
)
*
IpfsDHT
{
func
NewDHT
(
ctx
context
.
Context
,
h
host
.
Host
,
dstore
ds
.
Datastore
)
*
IpfsDHT
{
dht
:=
new
(
IpfsDHT
)
dht
.
datastore
=
dstore
dht
.
self
=
h
.
ID
()
...
...
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