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-provider
Commits
095af8f2
Commit
095af8f2
authored
May 28, 2019
by
Raúl Kripalani
Committed by
Steven Allen
May 31, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
migrate to go-libp2p-core.
closes #6391 License: MIT Signed-off-by:
Raúl Kripalani
<
raul@protocol.ai
>
parent
f8ac9dae
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
7 deletions
+7
-7
simple/provider.go
simple/provider.go
+1
-1
simple/provider_test.go
simple/provider_test.go
+2
-2
simple/reprovide.go
simple/reprovide.go
+1
-1
simple/reprovide_test.go
simple/reprovide_test.go
+3
-3
No files found.
simple/provider.go
View file @
095af8f2
...
...
@@ -9,7 +9,7 @@ import (
cid
"github.com/ipfs/go-cid"
q
"github.com/ipfs/go-ipfs/provider/queue"
logging
"github.com/ipfs/go-log"
routing
"github.com/libp2p/go-libp2p-routing"
routing
"github.com/libp2p/go-libp2p-
core/
routing"
)
var
logP
=
logging
.
Logger
(
"provider.simple"
)
...
...
simple/provider_test.go
View file @
095af8f2
...
...
@@ -10,7 +10,7 @@ import (
datastore
"github.com/ipfs/go-datastore"
sync
"github.com/ipfs/go-datastore/sync"
blocksutil
"github.com/ipfs/go-ipfs-blocksutil"
p
store
"github.com/libp2p/go-libp2p-
peerstore
"
p
eer
"github.com/libp2p/go-libp2p-
core/peer
"
q
"github.com/ipfs/go-ipfs/provider/queue"
...
...
@@ -28,7 +28,7 @@ func (r *mockRouting) Provide(ctx context.Context, cid cid.Cid, recursive bool)
return
nil
}
func
(
r
*
mockRouting
)
FindProvidersAsync
(
ctx
context
.
Context
,
cid
cid
.
Cid
,
timeout
int
)
<-
chan
p
store
.
Pee
rInfo
{
func
(
r
*
mockRouting
)
FindProvidersAsync
(
ctx
context
.
Context
,
cid
cid
.
Cid
,
timeout
int
)
<-
chan
p
eer
.
Add
rInfo
{
return
nil
}
...
...
simple/reprovide.go
View file @
095af8f2
...
...
@@ -14,7 +14,7 @@ import (
logging
"github.com/ipfs/go-log"
merkledag
"github.com/ipfs/go-merkledag"
verifcid
"github.com/ipfs/go-verifcid"
routing
"github.com/libp2p/go-libp2p-routing"
routing
"github.com/libp2p/go-libp2p-
core/
routing"
)
var
logR
=
logging
.
Logger
(
"reprovider.simple"
)
...
...
simple/reprovide_test.go
View file @
095af8f2
...
...
@@ -10,8 +10,8 @@ import (
dssync
"github.com/ipfs/go-datastore/sync"
"github.com/ipfs/go-ipfs-blockstore"
mock
"github.com/ipfs/go-ipfs-routing/mock"
p
store
"github.com/libp2p/go-libp2p-
peerstore
"
"github.com/libp2p/go-
testutil
"
p
eer
"github.com/libp2p/go-libp2p-
core/peer
"
testutil
"github.com/libp2p/go-
libp2p-testing/net
"
.
"github.com/ipfs/go-ipfs/provider/simple"
)
...
...
@@ -43,7 +43,7 @@ func TestReprovide(t *testing.T) {
t
.
Fatal
(
err
)
}
var
providers
[]
p
store
.
Pee
rInfo
var
providers
[]
p
eer
.
Add
rInfo
maxProvs
:=
100
provChan
:=
clB
.
FindProvidersAsync
(
ctx
,
blk
.
Cid
(),
maxProvs
)
...
...
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