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-unixfs
Commits
8ddfb57c
Commit
8ddfb57c
authored
Sep 11, 2014
by
Jeromy
Committed by
Juan Batiz-Benet
Oct 01, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
some bugfixes and added logging
parent
c41a9717
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
5 deletions
+7
-5
core/commands/add.go
core/commands/add.go
+1
-0
core/core.go
core/core.go
+2
-0
routing/dht/routing.go
routing/dht/routing.go
+4
-5
No files found.
core/commands/add.go
View file @
8ddfb57c
...
...
@@ -94,6 +94,7 @@ func addDir(n *core.IpfsNode, fpath string, depth int) (*dag.Node, error) {
}
}
fmt
.
Printf
(
"Adding dir: %s = %s
\n
"
,
fpath
)
return
tree
,
addNode
(
n
,
tree
,
fpath
)
}
...
...
core/core.go
View file @
8ddfb57c
...
...
@@ -238,3 +238,5 @@ func (n *IpfsNode) PinDagNode(nd *merkledag.Node) error {
u
.
DOut
(
"Pinning node. Currently No-Op
\n
"
)
return
nil
}
func
(
n
*
IpfsNode
)
SetIpnsEntry
()
{}
routing/dht/routing.go
View file @
8ddfb57c
...
...
@@ -152,15 +152,14 @@ func (dht *IpfsDHT) FindProvidersAsync2(ctx context.Context, key u.Key, count in
peers
:=
dht
.
routingTables
[
0
]
.
NearestPeers
(
kb
.
ConvertKey
(
key
),
AlphaValue
)
for
_
,
pp
:=
range
peers
{
ppp
:=
pp
go
func
()
{
pmes
,
err
:=
dht
.
findProvidersSingle
(
ctx
,
ppp
,
key
,
0
)
go
func
(
p
*
peer
.
Peer
)
{
pmes
,
err
:=
dht
.
findProvidersSingle
(
p
,
key
,
0
,
timeout
)
if
err
!=
nil
{
u
.
PErr
(
"%v
\n
"
,
err
)
return
}
dht
.
addPeerListAsync
(
key
,
pmes
.
GetP
roviderP
eers
(),
ps
,
count
,
peerOut
)
}()
dht
.
addPeerListAsync
(
key
,
pmes
.
GetPeers
(),
ps
,
count
,
peerOut
)
}(
pp
)
}
}()
...
...
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