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-bitswap
Commits
cb2f9e8b
Commit
cb2f9e8b
authored
Jan 28, 2016
by
Jeromy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
go-keyspace dep from libp2p added
License: MIT Signed-off-by:
Jeromy
<
jeromyj@gmail.com
>
parent
fc9de650
Changes
16
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
33 additions
and
33 deletions
+33
-33
bitswap.go
bitswap.go
+2
-2
bitswap_test.go
bitswap_test.go
+2
-2
decision/bench_test.go
decision/bench_test.go
+1
-1
decision/engine.go
decision/engine.go
+2
-2
decision/engine_test.go
decision/engine_test.go
+2
-2
decision/ledger.go
decision/ledger.go
+1
-1
decision/peer_request_queue.go
decision/peer_request_queue.go
+1
-1
message/message.go
message/message.go
+1
-1
network/interface.go
network/interface.go
+3
-3
network/ipfs_impl.go
network/ipfs_impl.go
+5
-5
testnet/interface.go
testnet/interface.go
+1
-1
testnet/network_test.go
testnet/network_test.go
+2
-2
testnet/peernet.go
testnet/peernet.go
+3
-3
testnet/virtual.go
testnet/virtual.go
+2
-2
testutils.go
testutils.go
+3
-3
wantmanager.go
wantmanager.go
+2
-2
No files found.
bitswap.go
View file @
cb2f9e8b
...
@@ -10,7 +10,6 @@ import (
...
@@ -10,7 +10,6 @@ import (
process
"github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/goprocess"
process
"github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/goprocess"
procctx
"github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/goprocess/context"
procctx
"github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/goprocess/context"
context
"gx/ipfs/QmZy2y8t9zQH2a1b8q2ZSLKp17ATuJoCNxxyMFG5qFExpt/go-net/context"
blocks
"github.com/ipfs/go-ipfs/blocks"
blocks
"github.com/ipfs/go-ipfs/blocks"
blockstore
"github.com/ipfs/go-ipfs/blocks/blockstore"
blockstore
"github.com/ipfs/go-ipfs/blocks/blockstore"
key
"github.com/ipfs/go-ipfs/blocks/key"
key
"github.com/ipfs/go-ipfs/blocks/key"
...
@@ -21,8 +20,9 @@ import (
...
@@ -21,8 +20,9 @@ import (
notifications
"github.com/ipfs/go-ipfs/exchange/bitswap/notifications"
notifications
"github.com/ipfs/go-ipfs/exchange/bitswap/notifications"
wantlist
"github.com/ipfs/go-ipfs/exchange/bitswap/wantlist"
wantlist
"github.com/ipfs/go-ipfs/exchange/bitswap/wantlist"
"github.com/ipfs/go-ipfs/thirdparty/delay"
"github.com/ipfs/go-ipfs/thirdparty/delay"
peer
"gx/ipfs/QmZxtCsPRgCnCXwVPUjcBiFckkG5NMYM4Pthwe6X4C8uQq/go-libp2p/p2p/peer"
context
"gx/ipfs/QmZy2y8t9zQH2a1b8q2ZSLKp17ATuJoCNxxyMFG5qFExpt/go-net/context"
logging
"gx/ipfs/QmaPaGNE2GqnfJjRRpQuQuFHuJn4FZvsrGxdik4kgxCkBi/go-log"
logging
"gx/ipfs/QmaPaGNE2GqnfJjRRpQuQuFHuJn4FZvsrGxdik4kgxCkBi/go-log"
peer
"gx/ipfs/QmY3NAw959vbE1oJooP9HchcRdBsbxhgQsEZTRhKgvoSuC/go-libp2p/p2p/peer"
)
)
var
log
=
logging
.
Logger
(
"bitswap"
)
var
log
=
logging
.
Logger
(
"bitswap"
)
...
...
bitswap_test.go
View file @
cb2f9e8b
...
@@ -7,8 +7,8 @@ import (
...
@@ -7,8 +7,8 @@ import (
"time"
"time"
detectrace
"github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-detect-race"
detectrace
"github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-detect-race"
context
"gx/ipfs/QmZy2y8t9zQH2a1b8q2ZSLKp17ATuJoCNxxyMFG5qFExpt/go-net/context"
travis
"github.com/ipfs/go-ipfs/util/testutil/ci/travis"
travis
"github.com/ipfs/go-ipfs/util/testutil/ci/travis"
context
"gx/ipfs/QmZy2y8t9zQH2a1b8q2ZSLKp17ATuJoCNxxyMFG5qFExpt/go-net/context"
blocks
"github.com/ipfs/go-ipfs/blocks"
blocks
"github.com/ipfs/go-ipfs/blocks"
blocksutil
"github.com/ipfs/go-ipfs/blocks/blocksutil"
blocksutil
"github.com/ipfs/go-ipfs/blocks/blocksutil"
...
@@ -16,7 +16,7 @@ import (
...
@@ -16,7 +16,7 @@ import (
tn
"github.com/ipfs/go-ipfs/exchange/bitswap/testnet"
tn
"github.com/ipfs/go-ipfs/exchange/bitswap/testnet"
mockrouting
"github.com/ipfs/go-ipfs/routing/mock"
mockrouting
"github.com/ipfs/go-ipfs/routing/mock"
delay
"github.com/ipfs/go-ipfs/thirdparty/delay"
delay
"github.com/ipfs/go-ipfs/thirdparty/delay"
p2ptestutil
"gx/ipfs/Qm
Y3NAw959vbE1oJooP9HchcRdBsbxhgQsEZTRhKgvoSuC
/go-libp2p/p2p/test/util"
p2ptestutil
"gx/ipfs/Qm
ZxtCsPRgCnCXwVPUjcBiFckkG5NMYM4Pthwe6X4C8uQq
/go-libp2p/p2p/test/util"
)
)
// FIXME the tests are really sensitive to the network delay. fix them to work
// FIXME the tests are really sensitive to the network delay. fix them to work
...
...
decision/bench_test.go
View file @
cb2f9e8b
...
@@ -7,7 +7,7 @@ import (
...
@@ -7,7 +7,7 @@ import (
key
"github.com/ipfs/go-ipfs/blocks/key"
key
"github.com/ipfs/go-ipfs/blocks/key"
"github.com/ipfs/go-ipfs/exchange/bitswap/wantlist"
"github.com/ipfs/go-ipfs/exchange/bitswap/wantlist"
"github.com/ipfs/go-ipfs/util/testutil"
"github.com/ipfs/go-ipfs/util/testutil"
"gx/ipfs/Qm
Y3NAw959vbE1oJooP9HchcRdBsbxhgQsEZTRhKgvoSuC
/go-libp2p/p2p/peer"
"gx/ipfs/Qm
ZxtCsPRgCnCXwVPUjcBiFckkG5NMYM4Pthwe6X4C8uQq
/go-libp2p/p2p/peer"
)
)
// FWIW: At the time of this commit, including a timestamp in task increases
// FWIW: At the time of this commit, including a timestamp in task increases
...
...
decision/engine.go
View file @
cb2f9e8b
...
@@ -4,13 +4,13 @@ package decision
...
@@ -4,13 +4,13 @@ package decision
import
(
import
(
"sync"
"sync"
context
"gx/ipfs/QmZy2y8t9zQH2a1b8q2ZSLKp17ATuJoCNxxyMFG5qFExpt/go-net/context"
blocks
"github.com/ipfs/go-ipfs/blocks"
blocks
"github.com/ipfs/go-ipfs/blocks"
bstore
"github.com/ipfs/go-ipfs/blocks/blockstore"
bstore
"github.com/ipfs/go-ipfs/blocks/blockstore"
bsmsg
"github.com/ipfs/go-ipfs/exchange/bitswap/message"
bsmsg
"github.com/ipfs/go-ipfs/exchange/bitswap/message"
wl
"github.com/ipfs/go-ipfs/exchange/bitswap/wantlist"
wl
"github.com/ipfs/go-ipfs/exchange/bitswap/wantlist"
peer
"gx/ipfs/QmZxtCsPRgCnCXwVPUjcBiFckkG5NMYM4Pthwe6X4C8uQq/go-libp2p/p2p/peer"
context
"gx/ipfs/QmZy2y8t9zQH2a1b8q2ZSLKp17ATuJoCNxxyMFG5qFExpt/go-net/context"
logging
"gx/ipfs/QmaPaGNE2GqnfJjRRpQuQuFHuJn4FZvsrGxdik4kgxCkBi/go-log"
logging
"gx/ipfs/QmaPaGNE2GqnfJjRRpQuQuFHuJn4FZvsrGxdik4kgxCkBi/go-log"
peer
"gx/ipfs/QmY3NAw959vbE1oJooP9HchcRdBsbxhgQsEZTRhKgvoSuC/go-libp2p/p2p/peer"
)
)
// TODO consider taking responsibility for other types of requests. For
// TODO consider taking responsibility for other types of requests. For
...
...
decision/engine_test.go
View file @
cb2f9e8b
...
@@ -10,12 +10,12 @@ import (
...
@@ -10,12 +10,12 @@ import (
ds
"github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/ipfs/go-datastore"
ds
"github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/ipfs/go-datastore"
dssync
"github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/ipfs/go-datastore/sync"
dssync
"github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/ipfs/go-datastore/sync"
context
"gx/ipfs/QmZy2y8t9zQH2a1b8q2ZSLKp17ATuJoCNxxyMFG5qFExpt/go-net/context"
blocks
"github.com/ipfs/go-ipfs/blocks"
blocks
"github.com/ipfs/go-ipfs/blocks"
blockstore
"github.com/ipfs/go-ipfs/blocks/blockstore"
blockstore
"github.com/ipfs/go-ipfs/blocks/blockstore"
message
"github.com/ipfs/go-ipfs/exchange/bitswap/message"
message
"github.com/ipfs/go-ipfs/exchange/bitswap/message"
testutil
"github.com/ipfs/go-ipfs/util/testutil"
testutil
"github.com/ipfs/go-ipfs/util/testutil"
peer
"gx/ipfs/QmY3NAw959vbE1oJooP9HchcRdBsbxhgQsEZTRhKgvoSuC/go-libp2p/p2p/peer"
peer
"gx/ipfs/QmZxtCsPRgCnCXwVPUjcBiFckkG5NMYM4Pthwe6X4C8uQq/go-libp2p/p2p/peer"
context
"gx/ipfs/QmZy2y8t9zQH2a1b8q2ZSLKp17ATuJoCNxxyMFG5qFExpt/go-net/context"
)
)
type
peerAndEngine
struct
{
type
peerAndEngine
struct
{
...
...
decision/ledger.go
View file @
cb2f9e8b
...
@@ -5,7 +5,7 @@ import (
...
@@ -5,7 +5,7 @@ import (
key
"github.com/ipfs/go-ipfs/blocks/key"
key
"github.com/ipfs/go-ipfs/blocks/key"
wl
"github.com/ipfs/go-ipfs/exchange/bitswap/wantlist"
wl
"github.com/ipfs/go-ipfs/exchange/bitswap/wantlist"
peer
"gx/ipfs/Qm
Y3NAw959vbE1oJooP9HchcRdBsbxhgQsEZTRhKgvoSuC
/go-libp2p/p2p/peer"
peer
"gx/ipfs/Qm
ZxtCsPRgCnCXwVPUjcBiFckkG5NMYM4Pthwe6X4C8uQq
/go-libp2p/p2p/peer"
)
)
// keySet is just a convenient alias for maps of keys, where we only care
// keySet is just a convenient alias for maps of keys, where we only care
...
...
decision/peer_request_queue.go
View file @
cb2f9e8b
...
@@ -7,7 +7,7 @@ import (
...
@@ -7,7 +7,7 @@ import (
key
"github.com/ipfs/go-ipfs/blocks/key"
key
"github.com/ipfs/go-ipfs/blocks/key"
wantlist
"github.com/ipfs/go-ipfs/exchange/bitswap/wantlist"
wantlist
"github.com/ipfs/go-ipfs/exchange/bitswap/wantlist"
pq
"github.com/ipfs/go-ipfs/thirdparty/pq"
pq
"github.com/ipfs/go-ipfs/thirdparty/pq"
peer
"gx/ipfs/Qm
Y3NAw959vbE1oJooP9HchcRdBsbxhgQsEZTRhKgvoSuC
/go-libp2p/p2p/peer"
peer
"gx/ipfs/Qm
ZxtCsPRgCnCXwVPUjcBiFckkG5NMYM4Pthwe6X4C8uQq
/go-libp2p/p2p/peer"
)
)
type
peerRequestQueue
interface
{
type
peerRequestQueue
interface
{
...
...
message/message.go
View file @
cb2f9e8b
...
@@ -7,7 +7,7 @@ import (
...
@@ -7,7 +7,7 @@ import (
key
"github.com/ipfs/go-ipfs/blocks/key"
key
"github.com/ipfs/go-ipfs/blocks/key"
pb
"github.com/ipfs/go-ipfs/exchange/bitswap/message/pb"
pb
"github.com/ipfs/go-ipfs/exchange/bitswap/message/pb"
wantlist
"github.com/ipfs/go-ipfs/exchange/bitswap/wantlist"
wantlist
"github.com/ipfs/go-ipfs/exchange/bitswap/wantlist"
inet
"gx/ipfs/Qm
Y3NAw959vbE1oJooP9HchcRdBsbxhgQsEZTRhKgvoSuC
/go-libp2p/p2p/net"
inet
"gx/ipfs/Qm
ZxtCsPRgCnCXwVPUjcBiFckkG5NMYM4Pthwe6X4C8uQq
/go-libp2p/p2p/net"
ggio
"github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/gogo/protobuf/io"
ggio
"github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/gogo/protobuf/io"
proto
"github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/gogo/protobuf/proto"
proto
"github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/gogo/protobuf/proto"
...
...
network/interface.go
View file @
cb2f9e8b
package
network
package
network
import
(
import
(
context
"gx/ipfs/QmZy2y8t9zQH2a1b8q2ZSLKp17ATuJoCNxxyMFG5qFExpt/go-net/context"
key
"github.com/ipfs/go-ipfs/blocks/key"
key
"github.com/ipfs/go-ipfs/blocks/key"
bsmsg
"github.com/ipfs/go-ipfs/exchange/bitswap/message"
bsmsg
"github.com/ipfs/go-ipfs/exchange/bitswap/message"
peer
"gx/ipfs/QmY3NAw959vbE1oJooP9HchcRdBsbxhgQsEZTRhKgvoSuC/go-libp2p/p2p/peer"
peer
"gx/ipfs/QmZxtCsPRgCnCXwVPUjcBiFckkG5NMYM4Pthwe6X4C8uQq/go-libp2p/p2p/peer"
protocol
"gx/ipfs/QmY3NAw959vbE1oJooP9HchcRdBsbxhgQsEZTRhKgvoSuC/go-libp2p/p2p/protocol"
protocol
"gx/ipfs/QmZxtCsPRgCnCXwVPUjcBiFckkG5NMYM4Pthwe6X4C8uQq/go-libp2p/p2p/protocol"
context
"gx/ipfs/QmZy2y8t9zQH2a1b8q2ZSLKp17ATuJoCNxxyMFG5qFExpt/go-net/context"
)
)
var
ProtocolBitswap
protocol
.
ID
=
"/ipfs/bitswap"
var
ProtocolBitswap
protocol
.
ID
=
"/ipfs/bitswap"
...
...
network/ipfs_impl.go
View file @
cb2f9e8b
package
network
package
network
import
(
import
(
context
"gx/ipfs/QmZy2y8t9zQH2a1b8q2ZSLKp17ATuJoCNxxyMFG5qFExpt/go-net/context"
key
"github.com/ipfs/go-ipfs/blocks/key"
key
"github.com/ipfs/go-ipfs/blocks/key"
bsmsg
"github.com/ipfs/go-ipfs/exchange/bitswap/message"
bsmsg
"github.com/ipfs/go-ipfs/exchange/bitswap/message"
routing
"github.com/ipfs/go-ipfs/routing"
routing
"github.com/ipfs/go-ipfs/routing"
logging
"gx/ipfs/QmaPaGNE2GqnfJjRRpQuQuFHuJn4FZvsrGxdik4kgxCkBi/go-log"
ma
"gx/ipfs/QmR3JkmZBKYXgNMNsNZawm914455Qof3PEopwuVSeXG7aV/go-multiaddr"
ma
"gx/ipfs/QmR3JkmZBKYXgNMNsNZawm914455Qof3PEopwuVSeXG7aV/go-multiaddr"
host
"gx/ipfs/QmY3NAw959vbE1oJooP9HchcRdBsbxhgQsEZTRhKgvoSuC/go-libp2p/p2p/host"
host
"gx/ipfs/QmZxtCsPRgCnCXwVPUjcBiFckkG5NMYM4Pthwe6X4C8uQq/go-libp2p/p2p/host"
inet
"gx/ipfs/QmY3NAw959vbE1oJooP9HchcRdBsbxhgQsEZTRhKgvoSuC/go-libp2p/p2p/net"
inet
"gx/ipfs/QmZxtCsPRgCnCXwVPUjcBiFckkG5NMYM4Pthwe6X4C8uQq/go-libp2p/p2p/net"
peer
"gx/ipfs/QmY3NAw959vbE1oJooP9HchcRdBsbxhgQsEZTRhKgvoSuC/go-libp2p/p2p/peer"
peer
"gx/ipfs/QmZxtCsPRgCnCXwVPUjcBiFckkG5NMYM4Pthwe6X4C8uQq/go-libp2p/p2p/peer"
context
"gx/ipfs/QmZy2y8t9zQH2a1b8q2ZSLKp17ATuJoCNxxyMFG5qFExpt/go-net/context"
logging
"gx/ipfs/QmaPaGNE2GqnfJjRRpQuQuFHuJn4FZvsrGxdik4kgxCkBi/go-log"
)
)
var
log
=
logging
.
Logger
(
"bitswap_network"
)
var
log
=
logging
.
Logger
(
"bitswap_network"
)
...
...
testnet/interface.go
View file @
cb2f9e8b
...
@@ -3,7 +3,7 @@ package bitswap
...
@@ -3,7 +3,7 @@ package bitswap
import
(
import
(
bsnet
"github.com/ipfs/go-ipfs/exchange/bitswap/network"
bsnet
"github.com/ipfs/go-ipfs/exchange/bitswap/network"
"github.com/ipfs/go-ipfs/util/testutil"
"github.com/ipfs/go-ipfs/util/testutil"
peer
"gx/ipfs/Qm
Y3NAw959vbE1oJooP9HchcRdBsbxhgQsEZTRhKgvoSuC
/go-libp2p/p2p/peer"
peer
"gx/ipfs/Qm
ZxtCsPRgCnCXwVPUjcBiFckkG5NMYM4Pthwe6X4C8uQq
/go-libp2p/p2p/peer"
)
)
type
Network
interface
{
type
Network
interface
{
...
...
testnet/network_test.go
View file @
cb2f9e8b
...
@@ -4,14 +4,14 @@ import (
...
@@ -4,14 +4,14 @@ import (
"sync"
"sync"
"testing"
"testing"
context
"gx/ipfs/QmZy2y8t9zQH2a1b8q2ZSLKp17ATuJoCNxxyMFG5qFExpt/go-net/context"
blocks
"github.com/ipfs/go-ipfs/blocks"
blocks
"github.com/ipfs/go-ipfs/blocks"
bsmsg
"github.com/ipfs/go-ipfs/exchange/bitswap/message"
bsmsg
"github.com/ipfs/go-ipfs/exchange/bitswap/message"
bsnet
"github.com/ipfs/go-ipfs/exchange/bitswap/network"
bsnet
"github.com/ipfs/go-ipfs/exchange/bitswap/network"
mockrouting
"github.com/ipfs/go-ipfs/routing/mock"
mockrouting
"github.com/ipfs/go-ipfs/routing/mock"
delay
"github.com/ipfs/go-ipfs/thirdparty/delay"
delay
"github.com/ipfs/go-ipfs/thirdparty/delay"
testutil
"github.com/ipfs/go-ipfs/util/testutil"
testutil
"github.com/ipfs/go-ipfs/util/testutil"
peer
"gx/ipfs/QmY3NAw959vbE1oJooP9HchcRdBsbxhgQsEZTRhKgvoSuC/go-libp2p/p2p/peer"
peer
"gx/ipfs/QmZxtCsPRgCnCXwVPUjcBiFckkG5NMYM4Pthwe6X4C8uQq/go-libp2p/p2p/peer"
context
"gx/ipfs/QmZy2y8t9zQH2a1b8q2ZSLKp17ATuJoCNxxyMFG5qFExpt/go-net/context"
)
)
func
TestSendMessageAsyncButWaitForResponse
(
t
*
testing
.
T
)
{
func
TestSendMessageAsyncButWaitForResponse
(
t
*
testing
.
T
)
{
...
...
testnet/peernet.go
View file @
cb2f9e8b
...
@@ -2,12 +2,12 @@ package bitswap
...
@@ -2,12 +2,12 @@ package bitswap
import
(
import
(
ds
"github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/ipfs/go-datastore"
ds
"github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/ipfs/go-datastore"
context
"gx/ipfs/QmZy2y8t9zQH2a1b8q2ZSLKp17ATuJoCNxxyMFG5qFExpt/go-net/context"
bsnet
"github.com/ipfs/go-ipfs/exchange/bitswap/network"
bsnet
"github.com/ipfs/go-ipfs/exchange/bitswap/network"
mockrouting
"github.com/ipfs/go-ipfs/routing/mock"
mockrouting
"github.com/ipfs/go-ipfs/routing/mock"
testutil
"github.com/ipfs/go-ipfs/util/testutil"
testutil
"github.com/ipfs/go-ipfs/util/testutil"
mockpeernet
"gx/ipfs/QmY3NAw959vbE1oJooP9HchcRdBsbxhgQsEZTRhKgvoSuC/go-libp2p/p2p/net/mock"
mockpeernet
"gx/ipfs/QmZxtCsPRgCnCXwVPUjcBiFckkG5NMYM4Pthwe6X4C8uQq/go-libp2p/p2p/net/mock"
peer
"gx/ipfs/QmY3NAw959vbE1oJooP9HchcRdBsbxhgQsEZTRhKgvoSuC/go-libp2p/p2p/peer"
peer
"gx/ipfs/QmZxtCsPRgCnCXwVPUjcBiFckkG5NMYM4Pthwe6X4C8uQq/go-libp2p/p2p/peer"
context
"gx/ipfs/QmZy2y8t9zQH2a1b8q2ZSLKp17ATuJoCNxxyMFG5qFExpt/go-net/context"
)
)
type
peernet
struct
{
type
peernet
struct
{
...
...
testnet/virtual.go
View file @
cb2f9e8b
...
@@ -3,7 +3,6 @@ package bitswap
...
@@ -3,7 +3,6 @@ package bitswap
import
(
import
(
"errors"
"errors"
context
"gx/ipfs/QmZy2y8t9zQH2a1b8q2ZSLKp17ATuJoCNxxyMFG5qFExpt/go-net/context"
key
"github.com/ipfs/go-ipfs/blocks/key"
key
"github.com/ipfs/go-ipfs/blocks/key"
bsmsg
"github.com/ipfs/go-ipfs/exchange/bitswap/message"
bsmsg
"github.com/ipfs/go-ipfs/exchange/bitswap/message"
bsnet
"github.com/ipfs/go-ipfs/exchange/bitswap/network"
bsnet
"github.com/ipfs/go-ipfs/exchange/bitswap/network"
...
@@ -11,7 +10,8 @@ import (
...
@@ -11,7 +10,8 @@ import (
mockrouting
"github.com/ipfs/go-ipfs/routing/mock"
mockrouting
"github.com/ipfs/go-ipfs/routing/mock"
delay
"github.com/ipfs/go-ipfs/thirdparty/delay"
delay
"github.com/ipfs/go-ipfs/thirdparty/delay"
testutil
"github.com/ipfs/go-ipfs/util/testutil"
testutil
"github.com/ipfs/go-ipfs/util/testutil"
peer
"gx/ipfs/QmY3NAw959vbE1oJooP9HchcRdBsbxhgQsEZTRhKgvoSuC/go-libp2p/p2p/peer"
peer
"gx/ipfs/QmZxtCsPRgCnCXwVPUjcBiFckkG5NMYM4Pthwe6X4C8uQq/go-libp2p/p2p/peer"
context
"gx/ipfs/QmZy2y8t9zQH2a1b8q2ZSLKp17ATuJoCNxxyMFG5qFExpt/go-net/context"
)
)
func
VirtualNetwork
(
rs
mockrouting
.
Server
,
d
delay
.
D
)
Network
{
func
VirtualNetwork
(
rs
mockrouting
.
Server
,
d
delay
.
D
)
Network
{
...
...
testutils.go
View file @
cb2f9e8b
...
@@ -5,14 +5,14 @@ import (
...
@@ -5,14 +5,14 @@ import (
ds
"github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/ipfs/go-datastore"
ds
"github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/ipfs/go-datastore"
ds_sync
"github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/ipfs/go-datastore/sync"
ds_sync
"github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/ipfs/go-datastore/sync"
context
"gx/ipfs/QmZy2y8t9zQH2a1b8q2ZSLKp17ATuJoCNxxyMFG5qFExpt/go-net/context"
blockstore
"github.com/ipfs/go-ipfs/blocks/blockstore"
blockstore
"github.com/ipfs/go-ipfs/blocks/blockstore"
tn
"github.com/ipfs/go-ipfs/exchange/bitswap/testnet"
tn
"github.com/ipfs/go-ipfs/exchange/bitswap/testnet"
delay
"github.com/ipfs/go-ipfs/thirdparty/delay"
delay
"github.com/ipfs/go-ipfs/thirdparty/delay"
datastore2
"github.com/ipfs/go-ipfs/util/datastore2"
datastore2
"github.com/ipfs/go-ipfs/util/datastore2"
testutil
"github.com/ipfs/go-ipfs/util/testutil"
testutil
"github.com/ipfs/go-ipfs/util/testutil"
peer
"gx/ipfs/QmY3NAw959vbE1oJooP9HchcRdBsbxhgQsEZTRhKgvoSuC/go-libp2p/p2p/peer"
peer
"gx/ipfs/QmZxtCsPRgCnCXwVPUjcBiFckkG5NMYM4Pthwe6X4C8uQq/go-libp2p/p2p/peer"
p2ptestutil
"gx/ipfs/QmY3NAw959vbE1oJooP9HchcRdBsbxhgQsEZTRhKgvoSuC/go-libp2p/p2p/test/util"
p2ptestutil
"gx/ipfs/QmZxtCsPRgCnCXwVPUjcBiFckkG5NMYM4Pthwe6X4C8uQq/go-libp2p/p2p/test/util"
context
"gx/ipfs/QmZy2y8t9zQH2a1b8q2ZSLKp17ATuJoCNxxyMFG5qFExpt/go-net/context"
)
)
// WARNING: this uses RandTestBogusIdentity DO NOT USE for NON TESTS!
// WARNING: this uses RandTestBogusIdentity DO NOT USE for NON TESTS!
...
...
wantmanager.go
View file @
cb2f9e8b
...
@@ -4,13 +4,13 @@ import (
...
@@ -4,13 +4,13 @@ import (
"sync"
"sync"
"time"
"time"
context
"gx/ipfs/QmZy2y8t9zQH2a1b8q2ZSLKp17ATuJoCNxxyMFG5qFExpt/go-net/context"
key
"github.com/ipfs/go-ipfs/blocks/key"
key
"github.com/ipfs/go-ipfs/blocks/key"
engine
"github.com/ipfs/go-ipfs/exchange/bitswap/decision"
engine
"github.com/ipfs/go-ipfs/exchange/bitswap/decision"
bsmsg
"github.com/ipfs/go-ipfs/exchange/bitswap/message"
bsmsg
"github.com/ipfs/go-ipfs/exchange/bitswap/message"
bsnet
"github.com/ipfs/go-ipfs/exchange/bitswap/network"
bsnet
"github.com/ipfs/go-ipfs/exchange/bitswap/network"
wantlist
"github.com/ipfs/go-ipfs/exchange/bitswap/wantlist"
wantlist
"github.com/ipfs/go-ipfs/exchange/bitswap/wantlist"
peer
"gx/ipfs/QmY3NAw959vbE1oJooP9HchcRdBsbxhgQsEZTRhKgvoSuC/go-libp2p/p2p/peer"
peer
"gx/ipfs/QmZxtCsPRgCnCXwVPUjcBiFckkG5NMYM4Pthwe6X4C8uQq/go-libp2p/p2p/peer"
context
"gx/ipfs/QmZy2y8t9zQH2a1b8q2ZSLKp17ATuJoCNxxyMFG5qFExpt/go-net/context"
)
)
type
WantManager
struct
{
type
WantManager
struct
{
...
...
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