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-graphsync
Commits
5cfe7b83
Commit
5cfe7b83
authored
Sep 22, 2020
by
hannahhoward
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
style(imports): fix imports
parent
09368acf
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
31 additions
and
31 deletions
+31
-31
benchmarks/testnet/peernet.go
benchmarks/testnet/peernet.go
+2
-2
ipldutil/ipldutil.go
ipldutil/ipldutil.go
+2
-2
ipldutil/traverser.go
ipldutil/traverser.go
+2
-2
metadata/metadata_test.go
metadata/metadata_test.go
+2
-2
requestmanager/executor/executor.go
requestmanager/executor/executor.go
+8
-8
requestmanager/executor/executor_test.go
requestmanager/executor/executor_test.go
+7
-7
requestmanager/requestmanager.go
requestmanager/requestmanager.go
+8
-8
No files found.
benchmarks/testnet/peernet.go
View file @
5cfe7b83
...
...
@@ -3,11 +3,11 @@ package testnet
import
(
"context"
gsnet
"github.com/ipfs/go-graphsync/network"
"github.com/libp2p/go-libp2p-core/peer"
tnet
"github.com/libp2p/go-libp2p-testing/net"
mockpeernet
"github.com/libp2p/go-libp2p/p2p/net/mock"
gsnet
"github.com/ipfs/go-graphsync/network"
)
type
peernet
struct
{
...
...
ipldutil/ipldutil.go
View file @
5cfe7b83
...
...
@@ -36,8 +36,8 @@ func Traverse(ctx context.Context, loader ipld.Loader, chooser traversal.LinkTar
node
:=
nb
.
Build
()
return
traversal
.
Progress
{
Cfg
:
&
traversal
.
Config
{
Ctx
:
ctx
,
LinkLoader
:
loader
,
Ctx
:
ctx
,
LinkLoader
:
loader
,
LinkTargetNodePrototypeChooser
:
chooser
,
},
}
.
WalkAdv
(
node
,
s
,
fn
)
...
...
ipldutil/traverser.go
View file @
5cfe7b83
...
...
@@ -167,8 +167,8 @@ func (t *traverser) start() {
}
err
=
traversal
.
Progress
{
Cfg
:
&
traversal
.
Config
{
Ctx
:
t
.
ctx
,
LinkLoader
:
loader
,
Ctx
:
t
.
ctx
,
LinkLoader
:
loader
,
LinkTargetNodePrototypeChooser
:
t
.
chooser
,
},
}
.
WalkAdv
(
nd
,
sel
,
t
.
visitor
)
...
...
metadata/metadata_test.go
View file @
5cfe7b83
...
...
@@ -7,11 +7,11 @@ import (
"github.com/ipld/go-ipld-prime/codec/dagcbor"
"github.com/ipld/go-ipld-prime/fluent"
cidlink
"github.com/ipld/go-ipld-prime/linking/cid"
basicnode
"github.com/ipld/go-ipld-prime/node/basic"
"github.com/stretchr/testify/require"
"github.com/ipfs/go-graphsync/testutil"
cidlink
"github.com/ipld/go-ipld-prime/linking/cid"
basicnode
"github.com/ipld/go-ipld-prime/node/basic"
)
func
TestDecodeEncodeMetadata
(
t
*
testing
.
T
)
{
...
...
requestmanager/executor/executor.go
View file @
5cfe7b83
...
...
@@ -36,15 +36,15 @@ type ExecutionEnv struct {
// RequestExecution are parameters for a single request execution
type
RequestExecution
struct
{
Ctx
context
.
Context
P
peer
.
ID
NetworkError
chan
error
Request
gsmsg
.
GraphSyncRequest
LastResponse
*
atomic
.
Value
DoNotSendCids
*
cid
.
Set
Ctx
context
.
Context
P
peer
.
ID
NetworkError
chan
error
Request
gsmsg
.
GraphSyncRequest
LastResponse
*
atomic
.
Value
DoNotSendCids
*
cid
.
Set
NodePrototypeChooser
traversal
.
LinkTargetNodePrototypeChooser
ResumeMessages
chan
[]
graphsync
.
ExtensionData
PauseMessages
chan
struct
{}
ResumeMessages
chan
[]
graphsync
.
ExtensionData
PauseMessages
chan
struct
{}
}
// Start begins execution of a request in a go routine
...
...
requestmanager/executor/executor_test.go
View file @
5cfe7b83
...
...
@@ -430,13 +430,13 @@ func (ree *requestExecutionEnv) requestExecution() (chan graphsync.ResponseProgr
TerminateRequest
:
ree
.
terminateRequest
,
Loader
:
ree
.
fal
.
AsyncLoad
,
}
.
Start
(
executor
.
RequestExecution
{
Ctx
:
ree
.
ctx
,
P
:
ree
.
p
,
LastResponse
:
&
lastResponse
,
Request
:
ree
.
request
,
DoNotSendCids
:
ree
.
doNotSendCids
,
Ctx
:
ree
.
ctx
,
P
:
ree
.
p
,
LastResponse
:
&
lastResponse
,
Request
:
ree
.
request
,
DoNotSendCids
:
ree
.
doNotSendCids
,
NodePrototypeChooser
:
ree
.
nodeStyleChooser
,
ResumeMessages
:
ree
.
resumeMessages
,
PauseMessages
:
ree
.
pauseMessages
,
ResumeMessages
:
ree
.
resumeMessages
,
PauseMessages
:
ree
.
pauseMessages
,
})
}
requestmanager/requestmanager.go
View file @
5cfe7b83
...
...
@@ -338,15 +338,15 @@ func (nrm *newRequestMessage) setupRequest(requestID graphsync.RequestID, rm *Re
Loader
:
rm
.
asyncLoader
.
AsyncLoad
,
}
.
Start
(
executor
.
RequestExecution
{
Ctx
:
ctx
,
P
:
p
,
Request
:
request
,
NetworkError
:
networkError
,
LastResponse
:
lastResponse
,
DoNotSendCids
:
doNotSendCids
,
Ctx
:
ctx
,
P
:
p
,
Request
:
request
,
NetworkError
:
networkError
,
LastResponse
:
lastResponse
,
DoNotSendCids
:
doNotSendCids
,
NodePrototypeChooser
:
hooksResult
.
CustomChooser
,
ResumeMessages
:
resumeMessages
,
PauseMessages
:
pauseMessages
,
ResumeMessages
:
resumeMessages
,
PauseMessages
:
pauseMessages
,
})
return
incoming
,
incomingError
}
...
...
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