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
85932703
Commit
85932703
authored
Mar 06, 2017
by
Jeromy Johnson
Committed by
GitHub
Mar 06, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3748 from ipfs/deps/update-dht
update go-libp2p-kad-dht with getclosestpeers fix
parents
d183ae75
310f9b19
Changes
17
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
25 additions
and
25 deletions
+25
-25
bitswap.go
bitswap.go
+2
-2
bitswap_test.go
bitswap_test.go
+1
-1
decision/bench_test.go
decision/bench_test.go
+1
-1
decision/engine.go
decision/engine.go
+1
-1
decision/engine_test.go
decision/engine_test.go
+1
-1
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
+1
-1
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
+1
-1
testnet/peernet.go
testnet/peernet.go
+2
-2
testnet/virtual.go
testnet/virtual.go
+2
-2
testutils.go
testutils.go
+2
-2
wantmanager.go
wantmanager.go
+1
-1
workers.go
workers.go
+1
-1
No files found.
bitswap.go
View file @
85932703
...
...
@@ -23,9 +23,9 @@ import (
process
"gx/ipfs/QmSF8fPo3jgVBAy8fpdjjYqgG87dkJgUprRBHRd2tmfgpP/goprocess"
procctx
"gx/ipfs/QmSF8fPo3jgVBAy8fpdjjYqgG87dkJgUprRBHRd2tmfgpP/goprocess/context"
logging
"gx/ipfs/QmSpJByNKFX1sCsHBEp3R73FL4NF6FnQTEGyNAXHm2GS52/go-log"
loggables
"gx/ipfs/QmTcfnDHimxBJqx6utpnWqVHdvyquXgkwAvYt4zMaJMKS2/go-libp2p-loggables"
cid
"gx/ipfs/QmV5gPoRsjN1Gid3LMdNZTyfCtP2DsvqEbMAmz82RmmiGk/go-cid"
peer
"gx/ipfs/QmZcUPvPhD1Xvk6mwijYF8AfR3mG31S1YsEfHG4khrFPRr/go-libp2p-peer"
peer
"gx/ipfs/QmWUswjn261LSyVxWAEpMVtPdy8zmKBJJfBpG3Qdpa8ZsE/go-libp2p-peer"
loggables
"gx/ipfs/QmXs1igHHEaUmMxKtbP8Z9wTjitQ75sqxaKQP4QgnLN4nn/go-libp2p-loggables"
)
var
log
=
logging
.
Logger
(
"bitswap"
)
...
...
bitswap_test.go
View file @
85932703
...
...
@@ -18,8 +18,8 @@ import (
detectrace
"github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-detect-race"
p2ptestutil
"gx/ipfs/QmNqvnxGtJBaKQnenD6uboNGdjSjHGmZGRxMHEevKJe5Pk/go-libp2p-netutil"
cid
"gx/ipfs/QmV5gPoRsjN1Gid3LMdNZTyfCtP2DsvqEbMAmz82RmmiGk/go-cid"
p2ptestutil
"gx/ipfs/QmdGRzr9bPTt2ZrBFaq5R2zzD7JFXNRxXZGkzsVcW6pEzh/go-libp2p-netutil"
)
// FIXME the tests are really sensitive to the network delay. fix them to work
...
...
decision/bench_test.go
View file @
85932703
...
...
@@ -8,7 +8,7 @@ import (
"github.com/ipfs/go-ipfs/exchange/bitswap/wantlist"
"github.com/ipfs/go-ipfs/thirdparty/testutil"
cid
"gx/ipfs/QmV5gPoRsjN1Gid3LMdNZTyfCtP2DsvqEbMAmz82RmmiGk/go-cid"
"gx/ipfs/Qm
ZcUPvPhD1Xvk6mwijYF8AfR3mG31S1YsEfHG4khrFPRr
/go-libp2p-peer"
"gx/ipfs/Qm
WUswjn261LSyVxWAEpMVtPdy8zmKBJJfBpG3Qdpa8ZsE
/go-libp2p-peer"
u
"gx/ipfs/QmZuY8aV7zbNXVy6DyN9SmnuH3o9nG852F4aTiSBpts8d1/go-ipfs-util"
)
...
...
decision/engine.go
View file @
85932703
...
...
@@ -11,7 +11,7 @@ import (
bsmsg
"github.com/ipfs/go-ipfs/exchange/bitswap/message"
wl
"github.com/ipfs/go-ipfs/exchange/bitswap/wantlist"
logging
"gx/ipfs/QmSpJByNKFX1sCsHBEp3R73FL4NF6FnQTEGyNAXHm2GS52/go-log"
peer
"gx/ipfs/Qm
ZcUPvPhD1Xvk6mwijYF8AfR3mG31S1YsEfHG4khrFPRr
/go-libp2p-peer"
peer
"gx/ipfs/Qm
WUswjn261LSyVxWAEpMVtPdy8zmKBJJfBpG3Qdpa8ZsE
/go-libp2p-peer"
)
// TODO consider taking responsibility for other types of requests. For
...
...
decision/engine_test.go
View file @
85932703
...
...
@@ -15,7 +15,7 @@ import (
testutil
"github.com/ipfs/go-ipfs/thirdparty/testutil"
ds
"gx/ipfs/QmRWDav6mzWseLWeYfVd5fvUKiVe9xNH29YfMF438fG364/go-datastore"
dssync
"gx/ipfs/QmRWDav6mzWseLWeYfVd5fvUKiVe9xNH29YfMF438fG364/go-datastore/sync"
peer
"gx/ipfs/Qm
ZcUPvPhD1Xvk6mwijYF8AfR3mG31S1YsEfHG4khrFPRr
/go-libp2p-peer"
peer
"gx/ipfs/Qm
WUswjn261LSyVxWAEpMVtPdy8zmKBJJfBpG3Qdpa8ZsE
/go-libp2p-peer"
)
type
peerAndEngine
struct
{
...
...
decision/ledger.go
View file @
85932703
...
...
@@ -7,7 +7,7 @@ import (
wl
"github.com/ipfs/go-ipfs/exchange/bitswap/wantlist"
cid
"gx/ipfs/QmV5gPoRsjN1Gid3LMdNZTyfCtP2DsvqEbMAmz82RmmiGk/go-cid"
peer
"gx/ipfs/Qm
ZcUPvPhD1Xvk6mwijYF8AfR3mG31S1YsEfHG4khrFPRr
/go-libp2p-peer"
peer
"gx/ipfs/Qm
WUswjn261LSyVxWAEpMVtPdy8zmKBJJfBpG3Qdpa8ZsE
/go-libp2p-peer"
)
func
newLedger
(
p
peer
.
ID
)
*
ledger
{
...
...
decision/peer_request_queue.go
View file @
85932703
...
...
@@ -8,7 +8,7 @@ import (
pq
"github.com/ipfs/go-ipfs/thirdparty/pq"
cid
"gx/ipfs/QmV5gPoRsjN1Gid3LMdNZTyfCtP2DsvqEbMAmz82RmmiGk/go-cid"
peer
"gx/ipfs/Qm
ZcUPvPhD1Xvk6mwijYF8AfR3mG31S1YsEfHG4khrFPRr
/go-libp2p-peer"
peer
"gx/ipfs/Qm
WUswjn261LSyVxWAEpMVtPdy8zmKBJJfBpG3Qdpa8ZsE
/go-libp2p-peer"
)
type
peerRequestQueue
interface
{
...
...
message/message.go
View file @
85932703
...
...
@@ -8,8 +8,8 @@ import (
pb
"github.com/ipfs/go-ipfs/exchange/bitswap/message/pb"
wantlist
"github.com/ipfs/go-ipfs/exchange/bitswap/wantlist"
inet
"gx/ipfs/QmRuZnMorqodado1yeTQiv1i9rmtKj29CjPSsBKM7DFXV4/go-libp2p-net"
cid
"gx/ipfs/QmV5gPoRsjN1Gid3LMdNZTyfCtP2DsvqEbMAmz82RmmiGk/go-cid"
inet
"gx/ipfs/QmVtMT3fD7DzQNW7hdm6Xe6KPstzcggrhNpeVZ4422UpKK/go-libp2p-net"
ggio
"gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV/gogo-protobuf/io"
proto
"gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV/gogo-protobuf/proto"
)
...
...
network/interface.go
View file @
85932703
...
...
@@ -5,8 +5,8 @@ import (
bsmsg
"github.com/ipfs/go-ipfs/exchange/bitswap/message"
cid
"gx/ipfs/QmV5gPoRsjN1Gid3LMdNZTyfCtP2DsvqEbMAmz82RmmiGk/go-cid"
peer
"gx/ipfs/QmWUswjn261LSyVxWAEpMVtPdy8zmKBJJfBpG3Qdpa8ZsE/go-libp2p-peer"
protocol
"gx/ipfs/QmZNkThpqfVXs9GNbexPrfBbXSLNYeKrE7jwFM2oqHbyqN/go-libp2p-protocol"
peer
"gx/ipfs/QmZcUPvPhD1Xvk6mwijYF8AfR3mG31S1YsEfHG4khrFPRr/go-libp2p-peer"
)
var
(
...
...
network/ipfs_impl.go
View file @
85932703
...
...
@@ -8,15 +8,15 @@ import (
bsmsg
"github.com/ipfs/go-ipfs/exchange/bitswap/message"
pstore
"gx/ipfs/QmQMQ2RUjnaEEX8ybmrhuFFGhAwPjyL1Eo6ZoJGD7aAccM/go-libp2p-peerstore"
inet
"gx/ipfs/QmRuZnMorqodado1yeTQiv1i9rmtKj29CjPSsBKM7DFXV4/go-libp2p-net"
ma
"gx/ipfs/QmSWLfmj5frN9xVLMMN846dMDriy5wN5jeghUm7aTW3DAG/go-multiaddr"
logging
"gx/ipfs/QmSpJByNKFX1sCsHBEp3R73FL4NF6FnQTEGyNAXHm2GS52/go-log"
routing
"gx/ipfs/QmUc6twRJRE9MNrUGd8eo9WjHHxebGppdZfptGCASkR7fF/go-libp2p-routing"
cid
"gx/ipfs/QmV5gPoRsjN1Gid3LMdNZTyfCtP2DsvqEbMAmz82RmmiGk/go-cid"
inet
"gx/ipfs/QmVtMT3fD7DzQNW7hdm6Xe6KPstzcggrhNpeVZ4422UpKK/go-libp2p-net"
peer
"gx/ipfs/QmWUswjn261LSyVxWAEpMVtPdy8zmKBJJfBpG3Qdpa8ZsE/go-libp2p-peer"
host
"gx/ipfs/QmXzeAcmKDTfNZQBiyF22hQKuTK7P5z6MBBQLTk9bbiSUc/go-libp2p-host"
ggio
"gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV/gogo-protobuf/io"
peer
"gx/ipfs/QmZcUPvPhD1Xvk6mwijYF8AfR3mG31S1YsEfHG4khrFPRr/go-libp2p-peer"
routing
"gx/ipfs/QmZghcVHwXQC3Zvnvn24LgTmSPkEn2o3PDyKb6nrtPRzRh/go-libp2p-routing"
host
"gx/ipfs/QmbzbRyd22gcW92U1rA2yKagB3myMYhk45XBknJ49F9XWJ/go-libp2p-host"
pstore
"gx/ipfs/Qme1g4e3m2SmdiSGGU3vSWmUStwUjc5oECnEriaK9Xa1HU/go-libp2p-peerstore"
)
var
log
=
logging
.
Logger
(
"bitswap_network"
)
...
...
testnet/interface.go
View file @
85932703
...
...
@@ -3,7 +3,7 @@ package bitswap
import
(
bsnet
"github.com/ipfs/go-ipfs/exchange/bitswap/network"
"github.com/ipfs/go-ipfs/thirdparty/testutil"
peer
"gx/ipfs/Qm
ZcUPvPhD1Xvk6mwijYF8AfR3mG31S1YsEfHG4khrFPRr
/go-libp2p-peer"
peer
"gx/ipfs/Qm
WUswjn261LSyVxWAEpMVtPdy8zmKBJJfBpG3Qdpa8ZsE
/go-libp2p-peer"
)
type
Network
interface
{
...
...
testnet/network_test.go
View file @
85932703
...
...
@@ -11,7 +11,7 @@ import (
mockrouting
"github.com/ipfs/go-ipfs/routing/mock"
delay
"github.com/ipfs/go-ipfs/thirdparty/delay"
testutil
"github.com/ipfs/go-ipfs/thirdparty/testutil"
peer
"gx/ipfs/Qm
ZcUPvPhD1Xvk6mwijYF8AfR3mG31S1YsEfHG4khrFPRr
/go-libp2p-peer"
peer
"gx/ipfs/Qm
WUswjn261LSyVxWAEpMVtPdy8zmKBJJfBpG3Qdpa8ZsE
/go-libp2p-peer"
)
func
TestSendMessageAsyncButWaitForResponse
(
t
*
testing
.
T
)
{
...
...
testnet/peernet.go
View file @
85932703
...
...
@@ -6,8 +6,8 @@ import (
mockrouting
"github.com/ipfs/go-ipfs/routing/mock"
testutil
"github.com/ipfs/go-ipfs/thirdparty/testutil"
ds
"gx/ipfs/QmRWDav6mzWseLWeYfVd5fvUKiVe9xNH29YfMF438fG364/go-datastore"
mock
peer
net
"gx/ipfs/Qm
U3g3psEDiC4tQh1Qu2NYg5aYVQqxC3m74ZavLwPfJEtu/go-libp2p/p2p/net/mock
"
peer
"gx/ipfs/Qm
ZcUPvPhD1Xvk6mwijYF8AfR3mG31S1YsEfHG4khrFPRr/go-libp2p-peer
"
peer
"gx/ipfs/Qm
WUswjn261LSyVxWAEpMVtPdy8zmKBJJfBpG3Qdpa8ZsE/go-libp2p-peer
"
mock
peer
net
"gx/ipfs/Qm
eWJwi61vii5g8zQUB9UGegfUbmhTKHgeDFP9XuSp5jZ4/go-libp2p/p2p/net/mock
"
)
type
peernet
struct
{
...
...
testnet/virtual.go
View file @
85932703
...
...
@@ -9,9 +9,9 @@ import (
mockrouting
"github.com/ipfs/go-ipfs/routing/mock"
delay
"github.com/ipfs/go-ipfs/thirdparty/delay"
testutil
"github.com/ipfs/go-ipfs/thirdparty/testutil"
routing
"gx/ipfs/QmUc6twRJRE9MNrUGd8eo9WjHHxebGppdZfptGCASkR7fF/go-libp2p-routing"
cid
"gx/ipfs/QmV5gPoRsjN1Gid3LMdNZTyfCtP2DsvqEbMAmz82RmmiGk/go-cid"
peer
"gx/ipfs/QmZcUPvPhD1Xvk6mwijYF8AfR3mG31S1YsEfHG4khrFPRr/go-libp2p-peer"
routing
"gx/ipfs/QmZghcVHwXQC3Zvnvn24LgTmSPkEn2o3PDyKb6nrtPRzRh/go-libp2p-routing"
peer
"gx/ipfs/QmWUswjn261LSyVxWAEpMVtPdy8zmKBJJfBpG3Qdpa8ZsE/go-libp2p-peer"
)
func
VirtualNetwork
(
rs
mockrouting
.
Server
,
d
delay
.
D
)
Network
{
...
...
testutils.go
View file @
85932703
...
...
@@ -10,10 +10,10 @@ import (
delay
"github.com/ipfs/go-ipfs/thirdparty/delay"
testutil
"github.com/ipfs/go-ipfs/thirdparty/testutil"
p2ptestutil
"gx/ipfs/QmNqvnxGtJBaKQnenD6uboNGdjSjHGmZGRxMHEevKJe5Pk/go-libp2p-netutil"
ds
"gx/ipfs/QmRWDav6mzWseLWeYfVd5fvUKiVe9xNH29YfMF438fG364/go-datastore"
ds_sync
"gx/ipfs/QmRWDav6mzWseLWeYfVd5fvUKiVe9xNH29YfMF438fG364/go-datastore/sync"
peer
"gx/ipfs/QmZcUPvPhD1Xvk6mwijYF8AfR3mG31S1YsEfHG4khrFPRr/go-libp2p-peer"
p2ptestutil
"gx/ipfs/QmdGRzr9bPTt2ZrBFaq5R2zzD7JFXNRxXZGkzsVcW6pEzh/go-libp2p-netutil"
peer
"gx/ipfs/QmWUswjn261LSyVxWAEpMVtPdy8zmKBJJfBpG3Qdpa8ZsE/go-libp2p-peer"
)
// WARNING: this uses RandTestBogusIdentity DO NOT USE for NON TESTS!
...
...
wantmanager.go
View file @
85932703
...
...
@@ -12,7 +12,7 @@ import (
metrics
"gx/ipfs/QmRg1gKTHzc3CZXSKzem8aR4E3TubFhbgXwfVuWnSK5CC5/go-metrics-interface"
cid
"gx/ipfs/QmV5gPoRsjN1Gid3LMdNZTyfCtP2DsvqEbMAmz82RmmiGk/go-cid"
peer
"gx/ipfs/Qm
ZcUPvPhD1Xvk6mwijYF8AfR3mG31S1YsEfHG4khrFPRr
/go-libp2p-peer"
peer
"gx/ipfs/Qm
WUswjn261LSyVxWAEpMVtPdy8zmKBJJfBpG3Qdpa8ZsE
/go-libp2p-peer"
)
type
WantManager
struct
{
...
...
workers.go
View file @
85932703
...
...
@@ -10,7 +10,7 @@ import (
procctx
"gx/ipfs/QmSF8fPo3jgVBAy8fpdjjYqgG87dkJgUprRBHRd2tmfgpP/goprocess/context"
logging
"gx/ipfs/QmSpJByNKFX1sCsHBEp3R73FL4NF6FnQTEGyNAXHm2GS52/go-log"
cid
"gx/ipfs/QmV5gPoRsjN1Gid3LMdNZTyfCtP2DsvqEbMAmz82RmmiGk/go-cid"
peer
"gx/ipfs/Qm
ZcUPvPhD1Xvk6mwijYF8AfR3mG31S1YsEfHG4khrFPRr
/go-libp2p-peer"
peer
"gx/ipfs/Qm
WUswjn261LSyVxWAEpMVtPdy8zmKBJJfBpG3Qdpa8ZsE
/go-libp2p-peer"
)
var
TaskWorkerCount
=
8
...
...
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