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
b13118ca
Commit
b13118ca
authored
Dec 03, 2017
by
Steven Allen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gx: update go-multihash
License: MIT Signed-off-by:
Steven Allen
<
steven@stebalien.com
>
parent
f763ea82
Changes
27
Hide whitespace changes
Inline
Side-by-side
Showing
27 changed files
with
76 additions
and
76 deletions
+76
-76
bitswap.go
bitswap.go
+3
-3
bitswap_test.go
bitswap_test.go
+5
-5
decision/bench_test.go
decision/bench_test.go
+4
-4
decision/engine.go
decision/engine.go
+2
-2
decision/engine_test.go
decision/engine_test.go
+3
-3
decision/ledger.go
decision/ledger.go
+2
-2
decision/peer_request_queue.go
decision/peer_request_queue.go
+2
-2
decision/peer_request_queue_test.go
decision/peer_request_queue_test.go
+3
-3
get.go
get.go
+2
-2
message/message.go
message/message.go
+3
-3
message/message_test.go
message/message_test.go
+3
-3
network/interface.go
network/interface.go
+3
-3
network/ipfs_impl.go
network/ipfs_impl.go
+8
-8
notifications/notifications.go
notifications/notifications.go
+2
-2
notifications/notifications_test.go
notifications/notifications_test.go
+2
-2
session.go
session.go
+4
-4
session_test.go
session_test.go
+2
-2
stat.go
stat.go
+1
-1
testnet/interface.go
testnet/interface.go
+2
-2
testnet/network_test.go
testnet/network_test.go
+3
-3
testnet/peernet.go
testnet/peernet.go
+3
-3
testnet/virtual.go
testnet/virtual.go
+5
-5
testutils.go
testutils.go
+3
-3
wantlist/wantlist.go
wantlist/wantlist.go
+1
-1
wantlist/wantlist_test.go
wantlist/wantlist_test.go
+1
-1
wantmanager.go
wantmanager.go
+2
-2
workers.go
workers.go
+2
-2
No files found.
bitswap.go
View file @
b13118ca
...
...
@@ -19,13 +19,13 @@ import (
flags
"github.com/ipfs/go-ipfs/flags"
"github.com/ipfs/go-ipfs/thirdparty/delay"
cid
"gx/ipfs/QmNp85zy9RLrQ5oQD4hPyS39ezrrXpcaa7R4Y9kxdWQLLQ/go-cid"
metrics
"gx/ipfs/QmRg1gKTHzc3CZXSKzem8aR4E3TubFhbgXwfVuWnSK5CC5/go-metrics-interface"
process
"gx/ipfs/QmSF8fPo3jgVBAy8fpdjjYqgG87dkJgUprRBHRd2tmfgpP/goprocess"
procctx
"gx/ipfs/QmSF8fPo3jgVBAy8fpdjjYqgG87dkJgUprRBHRd2tmfgpP/goprocess/context"
blocks
"gx/ipfs/QmSn9Td7xgxm9EV7iEjTckpUWmWApggzPxu7eFGWkkpwin/go-block-format"
logging
"gx/ipfs/QmSpJByNKFX1sCsHBEp3R73FL4NF6FnQTEGyNAXHm2GS52/go-log"
peer
"gx/ipfs/QmXYjuNuxVzXKJCfWasQk1RqkhVLDM9jtUKhqc2WPQmFSB/go-libp2p-peer"
peer
"gx/ipfs/QmWNY7dV54ZDYmTA1ykVdwNCqC11mpU4zSUp6XDpLTH9eG/go-libp2p-peer"
blocks
"gx/ipfs/QmYsEQydGrsxNZfAiskvQ76N2xE9hDQtSAkRSynwMiUK3c/go-block-format"
cid
"gx/ipfs/QmeSrf6pzut73u6zLQkRFQ3ygt3k6XFT2kjdYP8Tnkwwyg/go-cid"
)
var
log
=
logging
.
Logger
(
"bitswap"
)
...
...
bitswap_test.go
View file @
b13118ca
...
...
@@ -17,11 +17,11 @@ import (
detectrace
"github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-detect-race"
cid
"gx/ipfs/Qm
Np85zy9RLrQ5oQD4hPyS39ezrrXpcaa7R4Y9kxdWQLLQ/go-cid
"
tu
"gx/ipfs/Qm
QgLZP9haZheimMHqqAjJh2LhRmNfEoZDfbtkpeMhi9xK/go-tes
tutil"
t
ravis
"gx/ipfs/Qm
QgLZP9haZheimMHqqAjJh2LhRmNfEoZDfbtkpeMhi9xK
/go-testutil
/ci/travis
"
block
s
"gx/ipfs/Qm
Sn9Td7xgxm9EV7iEjTckpUWmWApggzPxu7eFGWkkpwin/go-block-format
"
p2ptestutil
"gx/ipfs/Qm
UUNDRYXgfqdjxTg79ogkciczU5y4WY1tKMU2vEX9CRN7/go-libp2p-netutil
"
blocks
"gx/ipfs/Qm
YsEQydGrsxNZfAiskvQ76N2xE9hDQtSAkRSynwMiUK3c/go-block-format
"
p2ptestutil
"gx/ipfs/Qm
ZTcPxK6VqrwY94JpKZPvEqAZ6tEr1rLrpcqJbbRZbg2V/go-libp2p-ne
tutil"
t
u
"gx/ipfs/Qm
eDA8gNhvRTsbrjEieay5wezupJDiky8xvCzDABbsGzmp
/go-testutil"
travi
s
"gx/ipfs/Qm
eDA8gNhvRTsbrjEieay5wezupJDiky8xvCzDABbsGzmp/go-testutil/ci/travis
"
cid
"gx/ipfs/Qm
eSrf6pzut73u6zLQkRFQ3ygt3k6XFT2kjdYP8Tnkwwyg/go-cid
"
)
// FIXME the tests are really sensitive to the network delay. fix them to work
...
...
decision/bench_test.go
View file @
b13118ca
...
...
@@ -6,10 +6,10 @@ import (
"testing"
"github.com/ipfs/go-ipfs/exchange/bitswap/wantlist"
cid
"gx/ipfs/Qm
Np85zy9RLrQ5oQD4hPyS39ezrrXpcaa7R4Y9kxdWQLLQ/go-cid
"
"gx/ipfs/Qm
QgLZP9haZheimMHqqAjJh2LhRmNfEoZDfbtkpeMhi9xK/go-testutil
"
u
"gx/ipfs/Qm
SU6eubNdhXjFBJBSksTp8kv8YRub8mGAPv8tVJHmL2EU/go-ipfs-
util"
"gx/ipfs/Qm
XYjuNuxVzXKJCfWasQk1RqkhVLDM9jtUKhqc2WPQmFSB/go-libp2p-peer
"
u
"gx/ipfs/Qm
PsAfmDBnZN3kZGSuNwvCNDZiHneERSKmRcFyG3UkvcT3/go-ipfs-util
"
"gx/ipfs/Qm
WNY7dV54ZDYmTA1ykVdwNCqC11mpU4zSUp6XDpLTH9eG/go-libp2p-peer
"
"gx/ipfs/Qm
eDA8gNhvRTsbrjEieay5wezupJDiky8xvCzDABbsGzmp/go-test
util"
cid
"gx/ipfs/Qm
eSrf6pzut73u6zLQkRFQ3ygt3k6XFT2kjdYP8Tnkwwyg/go-cid
"
)
// FWIW: At the time of this commit, including a timestamp in task increases
...
...
decision/engine.go
View file @
b13118ca
...
...
@@ -9,9 +9,9 @@ import (
bstore
"github.com/ipfs/go-ipfs/blocks/blockstore"
bsmsg
"github.com/ipfs/go-ipfs/exchange/bitswap/message"
wl
"github.com/ipfs/go-ipfs/exchange/bitswap/wantlist"
blocks
"gx/ipfs/QmSn9Td7xgxm9EV7iEjTckpUWmWApggzPxu7eFGWkkpwin/go-block-format"
logging
"gx/ipfs/QmSpJByNKFX1sCsHBEp3R73FL4NF6FnQTEGyNAXHm2GS52/go-log"
peer
"gx/ipfs/QmXYjuNuxVzXKJCfWasQk1RqkhVLDM9jtUKhqc2WPQmFSB/go-libp2p-peer"
peer
"gx/ipfs/QmWNY7dV54ZDYmTA1ykVdwNCqC11mpU4zSUp6XDpLTH9eG/go-libp2p-peer"
blocks
"gx/ipfs/QmYsEQydGrsxNZfAiskvQ76N2xE9hDQtSAkRSynwMiUK3c/go-block-format"
)
// TODO consider taking responsibility for other types of requests. For
...
...
decision/engine_test.go
View file @
b13118ca
...
...
@@ -11,11 +11,11 @@ import (
blockstore
"github.com/ipfs/go-ipfs/blocks/blockstore"
message
"github.com/ipfs/go-ipfs/exchange/bitswap/message"
testutil
"gx/ipfs/QmQgLZP9haZheimMHqqAjJh2LhRmNfEoZDfbtkpeMhi9xK/go-testutil"
blocks
"gx/ipfs/QmSn9Td7xgxm9EV7iEjTckpUWmWApggzPxu7eFGWkkpwin/go-block-format"
peer
"gx/ipfs/QmXYjuNuxVzXKJCfWasQk1RqkhVLDM9jtUKhqc2WPQmFSB/go-libp2p-peer"
peer
"gx/ipfs/QmWNY7dV54ZDYmTA1ykVdwNCqC11mpU4zSUp6XDpLTH9eG/go-libp2p-peer"
blocks
"gx/ipfs/QmYsEQydGrsxNZfAiskvQ76N2xE9hDQtSAkRSynwMiUK3c/go-block-format"
ds
"gx/ipfs/QmdHG8MAuARdGHxx4rPQASLcvhz24fzjSQq7AJRAQEorq5/go-datastore"
dssync
"gx/ipfs/QmdHG8MAuARdGHxx4rPQASLcvhz24fzjSQq7AJRAQEorq5/go-datastore/sync"
testutil
"gx/ipfs/QmeDA8gNhvRTsbrjEieay5wezupJDiky8xvCzDABbsGzmp/go-testutil"
)
type
peerAndEngine
struct
{
...
...
decision/ledger.go
View file @
b13118ca
...
...
@@ -6,8 +6,8 @@ import (
wl
"github.com/ipfs/go-ipfs/exchange/bitswap/wantlist"
cid
"gx/ipfs/Qm
Np85zy9RLrQ5oQD4hPyS39ezrrXpcaa7R4Y9kxdWQLLQ/go-cid
"
peer
"gx/ipfs/Qm
XYjuNuxVzXKJCfWasQk1RqkhVLDM9jtUKhqc2WPQmFSB/go-libp2p-peer
"
peer
"gx/ipfs/Qm
WNY7dV54ZDYmTA1ykVdwNCqC11mpU4zSUp6XDpLTH9eG/go-libp2p-peer
"
cid
"gx/ipfs/Qm
eSrf6pzut73u6zLQkRFQ3ygt3k6XFT2kjdYP8Tnkwwyg/go-cid
"
)
func
newLedger
(
p
peer
.
ID
)
*
ledger
{
...
...
decision/peer_request_queue.go
View file @
b13118ca
...
...
@@ -7,8 +7,8 @@ import (
wantlist
"github.com/ipfs/go-ipfs/exchange/bitswap/wantlist"
pq
"github.com/ipfs/go-ipfs/thirdparty/pq"
cid
"gx/ipfs/Qm
Np85zy9RLrQ5oQD4hPyS39ezrrXpcaa7R4Y9kxdWQLLQ/go-cid
"
peer
"gx/ipfs/Qm
XYjuNuxVzXKJCfWasQk1RqkhVLDM9jtUKhqc2WPQmFSB/go-libp2p-peer
"
peer
"gx/ipfs/Qm
WNY7dV54ZDYmTA1ykVdwNCqC11mpU4zSUp6XDpLTH9eG/go-libp2p-peer
"
cid
"gx/ipfs/Qm
eSrf6pzut73u6zLQkRFQ3ygt3k6XFT2kjdYP8Tnkwwyg/go-cid
"
)
type
peerRequestQueue
interface
{
...
...
decision/peer_request_queue_test.go
View file @
b13118ca
...
...
@@ -9,9 +9,9 @@ import (
"testing"
"github.com/ipfs/go-ipfs/exchange/bitswap/wantlist"
cid
"gx/ipfs/Qm
Np85zy9RLrQ5oQD4hPyS39ezrrXpcaa7R4Y9kxdWQLLQ/go-cid
"
"gx/ipfs/Qm
QgLZP9haZheimMHqqAjJh2LhRmNfEoZDfbtkpeMhi9xK
/go-testutil"
u
"gx/ipfs/Qm
SU6eubNdhXjFBJBSksTp8kv8YRub8mGAPv8tVJHmL2EU/go-ipfs-util
"
u
"gx/ipfs/Qm
PsAfmDBnZN3kZGSuNwvCNDZiHneERSKmRcFyG3UkvcT3/go-ipfs-util
"
"gx/ipfs/Qm
eDA8gNhvRTsbrjEieay5wezupJDiky8xvCzDABbsGzmp
/go-testutil"
cid
"gx/ipfs/Qm
eSrf6pzut73u6zLQkRFQ3ygt3k6XFT2kjdYP8Tnkwwyg/go-cid
"
)
func
TestPushPop
(
t
*
testing
.
T
)
{
...
...
get.go
View file @
b13118ca
...
...
@@ -6,9 +6,9 @@ import (
blockstore
"github.com/ipfs/go-ipfs/blocks/blockstore"
notifications
"github.com/ipfs/go-ipfs/exchange/bitswap/notifications"
blocks
"gx/ipfs/Qm
Sn9Td7xgxm9EV7iEjTckpUWmWApggzPxu7eFGWkkpwin
/go-block-format"
blocks
"gx/ipfs/Qm
YsEQydGrsxNZfAiskvQ76N2xE9hDQtSAkRSynwMiUK3c
/go-block-format"
cid
"gx/ipfs/Qm
Np85zy9RLrQ5oQD4hPyS39ezrrXpcaa7R4Y9kxdWQLLQ
/go-cid"
cid
"gx/ipfs/Qm
eSrf6pzut73u6zLQkRFQ3ygt3k6XFT2kjdYP8Tnkwwyg
/go-cid"
)
type
getBlocksFunc
func
(
context
.
Context
,
[]
*
cid
.
Cid
)
(
<-
chan
blocks
.
Block
,
error
)
...
...
message/message.go
View file @
b13118ca
...
...
@@ -6,12 +6,12 @@ import (
pb
"github.com/ipfs/go-ipfs/exchange/bitswap/message/pb"
wantlist
"github.com/ipfs/go-ipfs/exchange/bitswap/wantlist"
blocks
"gx/ipfs/Qm
Sn9Td7xgxm9EV7iEjTckpUWmWApggzPxu7eFGWkkpwin
/go-block-format"
blocks
"gx/ipfs/Qm
YsEQydGrsxNZfAiskvQ76N2xE9hDQtSAkRSynwMiUK3c
/go-block-format"
cid
"gx/ipfs/Qm
Np85zy9RLrQ5oQD4hPyS39ezrrXpcaa7R4Y9kxdWQLLQ/go-cid
"
inet
"gx/ipfs/Qm
U4vCDZTPLDqSDKguWbHCiUe46mZUtmM2g2suBZ9NE8ko/go-libp2p-net
"
ggio
"gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV/gogo-protobuf/io"
proto
"gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV/gogo-protobuf/proto"
inet
"gx/ipfs/Qm
bD5yKbXahNvoMqzeuNyKQA9vAs9fUvJg2GXeWU1fVqY5/go-libp2p-net
"
cid
"gx/ipfs/Qm
eSrf6pzut73u6zLQkRFQ3ygt3k6XFT2kjdYP8Tnkwwyg/go-cid
"
)
// TODO move message.go into the bitswap package
...
...
message/message_test.go
View file @
b13118ca
...
...
@@ -6,10 +6,10 @@ import (
pb
"github.com/ipfs/go-ipfs/exchange/bitswap/message/pb"
cid
"gx/ipfs/QmNp85zy9RLrQ5oQD4hPyS39ezrrXpcaa7R4Y9kxdWQLLQ/go-cid"
u
"gx/ipfs/QmSU6eubNdhXjFBJBSksTp8kv8YRub8mGAPv8tVJHmL2EU/go-ipfs-util"
blocks
"gx/ipfs/QmSn9Td7xgxm9EV7iEjTckpUWmWApggzPxu7eFGWkkpwin/go-block-format"
u
"gx/ipfs/QmPsAfmDBnZN3kZGSuNwvCNDZiHneERSKmRcFyG3UkvcT3/go-ipfs-util"
blocks
"gx/ipfs/QmYsEQydGrsxNZfAiskvQ76N2xE9hDQtSAkRSynwMiUK3c/go-block-format"
proto
"gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV/gogo-protobuf/proto"
cid
"gx/ipfs/QmeSrf6pzut73u6zLQkRFQ3ygt3k6XFT2kjdYP8Tnkwwyg/go-cid"
)
func
mkFakeCid
(
s
string
)
*
cid
.
Cid
{
...
...
network/interface.go
View file @
b13118ca
...
...
@@ -5,10 +5,10 @@ import (
bsmsg
"github.com/ipfs/go-ipfs/exchange/bitswap/message"
cid
"gx/ipfs/QmNp85zy9RLrQ5oQD4hPyS39ezrrXpcaa7R4Y9kxdWQLLQ/go-cid"
ifconnmgr
"gx/ipfs/QmWfkNorhirGE1Qp3VwBWcnGaj4adv4hNqCYwabMrEYc21/go-libp2p-interface-connmgr"
peer
"gx/ipfs/QmXYjuNuxVzXKJCfWasQk1RqkhVLDM9jtUKhqc2WPQmFSB/go-libp2p-peer"
ifconnmgr
"gx/ipfs/QmSAJm4QdTJ3EGF2cvgNcQyXTEbxqWSW1x4kCVV1aJQUQr/go-libp2p-interface-connmgr"
peer
"gx/ipfs/QmWNY7dV54ZDYmTA1ykVdwNCqC11mpU4zSUp6XDpLTH9eG/go-libp2p-peer"
protocol
"gx/ipfs/QmZNkThpqfVXs9GNbexPrfBbXSLNYeKrE7jwFM2oqHbyqN/go-libp2p-protocol"
cid
"gx/ipfs/QmeSrf6pzut73u6zLQkRFQ3ygt3k6XFT2kjdYP8Tnkwwyg/go-cid"
)
var
(
...
...
network/ipfs_impl.go
View file @
b13118ca
...
...
@@ -8,16 +8,16 @@ import (
bsmsg
"github.com/ipfs/go-ipfs/exchange/bitswap/message"
cid
"gx/ipfs/QmNp85zy9RLrQ5oQD4hPyS39ezrrXpcaa7R4Y9kxdWQLLQ/go-cid"
routing
"gx/ipfs/QmPR2JzfKd9poHx9XBhzoFeBBC31ZM3W5iUPKJZWyaoZZm/go-libp2p-routing"
pstore
"gx/ipfs/QmPgDWmTmuzvP7QE5zwo1TmjbJme9pmZHNujB2453jkCTr/go-libp2p-peerstore"
host
"gx/ipfs/QmRS46AyqtpJBsf1zmQdeizSDEzo1qkWR7rdEuPFAv8237/go-libp2p-host"
host
"gx/ipfs/QmP46LGWhzVZTMmt5akNNLfoV8qL4h5wTwmzQxLyDafggd/go-libp2p-host"
routing
"gx/ipfs/QmPCGUjMRuBcPybZFpjhzpifwPP9wPRoiy5geTQKU4vqWA/go-libp2p-routing"
ifconnmgr
"gx/ipfs/QmSAJm4QdTJ3EGF2cvgNcQyXTEbxqWSW1x4kCVV1aJQUQr/go-libp2p-interface-connmgr"
logging
"gx/ipfs/QmSpJByNKFX1sCsHBEp3R73FL4NF6FnQTEGyNAXHm2GS52/go-log"
ifconnmgr
"gx/ipfs/QmWfkNorhirGE1Qp3VwBWcnGaj4adv4hNqCYwabMrEYc21/go-libp2p-interface-connmgr"
ma
"gx/ipfs/QmXY77cVe7rVRQXZZQRioukUM7aRW3BTcAgJe12MCtb3Ji/go-multiaddr"
peer
"gx/ipfs/QmXYjuNuxVzXKJCfWasQk1RqkhVLDM9jtUKhqc2WPQmFSB/go-libp2p-peer"
inet
"gx/ipfs/QmU4vCDZTPLDqSDKguWbHCiUe46mZUtmM2g2suBZ9NE8ko/go-libp2p-net"
ma
"gx/ipfs/QmW8s4zTsUoX1Q6CeYxVKPyqSKbF7H1YDUyTostBtZ8DaG/go-multiaddr"
peer
"gx/ipfs/QmWNY7dV54ZDYmTA1ykVdwNCqC11mpU4zSUp6XDpLTH9eG/go-libp2p-peer"
pstore
"gx/ipfs/QmYijbtjCxFEjSXaudaQAUz3LN5VKLssm8WCUsRoqzXmQR/go-libp2p-peerstore"
ggio
"gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV/gogo-protobuf/io"
inet
"gx/ipfs/Qm
bD5yKbXahNvoMqzeuNyKQA9vAs9fUvJg2GXeWU1fVqY5/go-libp2p-net
"
cid
"gx/ipfs/Qm
eSrf6pzut73u6zLQkRFQ3ygt3k6XFT2kjdYP8Tnkwwyg/go-cid
"
)
var
log
=
logging
.
Logger
(
"bitswap_network"
)
...
...
notifications/notifications.go
View file @
b13118ca
...
...
@@ -3,10 +3,10 @@ package notifications
import
(
"context"
blocks
"gx/ipfs/Qm
Sn9Td7xgxm9EV7iEjTckpUWmWApggzPxu7eFGWkkpwin
/go-block-format"
blocks
"gx/ipfs/Qm
YsEQydGrsxNZfAiskvQ76N2xE9hDQtSAkRSynwMiUK3c
/go-block-format"
pubsub
"github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/briantigerchow/pubsub"
cid
"gx/ipfs/Qm
Np85zy9RLrQ5oQD4hPyS39ezrrXpcaa7R4Y9kxdWQLLQ
/go-cid"
cid
"gx/ipfs/Qm
eSrf6pzut73u6zLQkRFQ3ygt3k6XFT2kjdYP8Tnkwwyg
/go-cid"
)
const
bufferSize
=
16
...
...
notifications/notifications_test.go
View file @
b13118ca
...
...
@@ -7,8 +7,8 @@ import (
"time"
blocksutil
"github.com/ipfs/go-ipfs/blocks/blocksutil"
cid
"gx/ipfs/Qm
Np85zy9RLrQ5oQD4hPyS39ezrrXpcaa7R4Y9kxdWQLLQ/go-cid
"
blocks
"gx/ipfs/Qm
Sn9Td7xgxm9EV7iEjTckpUWmWApggzPxu7eFGWkkpwin/go-block-format
"
blocks
"gx/ipfs/Qm
YsEQydGrsxNZfAiskvQ76N2xE9hDQtSAkRSynwMiUK3c/go-block-format
"
cid
"gx/ipfs/Qm
eSrf6pzut73u6zLQkRFQ3ygt3k6XFT2kjdYP8Tnkwwyg/go-cid
"
)
func
TestDuplicates
(
t
*
testing
.
T
)
{
...
...
session.go
View file @
b13118ca
...
...
@@ -7,12 +7,12 @@ import (
notifications
"github.com/ipfs/go-ipfs/exchange/bitswap/notifications"
cid
"gx/ipfs/QmNp85zy9RLrQ5oQD4hPyS39ezrrXpcaa7R4Y9kxdWQLLQ/go-cid"
blocks
"gx/ipfs/QmSn9Td7xgxm9EV7iEjTckpUWmWApggzPxu7eFGWkkpwin/go-block-format"
logging
"gx/ipfs/QmSpJByNKFX1sCsHBEp3R73FL4NF6FnQTEGyNAXHm2GS52/go-log"
loggables
"gx/ipfs/Qm
T4PgCNdv73hnFAqzHqwW44q7M9PWpykSswHDxndquZbc
/go-libp2p-loggables"
loggables
"gx/ipfs/Qm
SvcDkiRwB8LuMhUtnvhum2C851Mproo75ZDD19jx43tD
/go-libp2p-loggables"
lru
"gx/ipfs/QmVYxfoJQiZijTgPNHCHgHELvQpbsJNTg6Crmc3dQkj3yy/golang-lru"
peer
"gx/ipfs/QmXYjuNuxVzXKJCfWasQk1RqkhVLDM9jtUKhqc2WPQmFSB/go-libp2p-peer"
peer
"gx/ipfs/QmWNY7dV54ZDYmTA1ykVdwNCqC11mpU4zSUp6XDpLTH9eG/go-libp2p-peer"
blocks
"gx/ipfs/QmYsEQydGrsxNZfAiskvQ76N2xE9hDQtSAkRSynwMiUK3c/go-block-format"
cid
"gx/ipfs/QmeSrf6pzut73u6zLQkRFQ3ygt3k6XFT2kjdYP8Tnkwwyg/go-cid"
)
const
activeWantsLimit
=
16
...
...
session_test.go
View file @
b13118ca
...
...
@@ -8,8 +8,8 @@ import (
blocksutil
"github.com/ipfs/go-ipfs/blocks/blocksutil"
cid
"gx/ipfs/Qm
Np85zy9RLrQ5oQD4hPyS39ezrrXpcaa7R4Y9kxdWQLLQ/go-cid
"
blocks
"gx/ipfs/Qm
Sn9Td7xgxm9EV7iEjTckpUWmWApggzPxu7eFGWkkpwin/go-block-format
"
blocks
"gx/ipfs/Qm
YsEQydGrsxNZfAiskvQ76N2xE9hDQtSAkRSynwMiUK3c/go-block-format
"
cid
"gx/ipfs/Qm
eSrf6pzut73u6zLQkRFQ3ygt3k6XFT2kjdYP8Tnkwwyg/go-cid
"
)
func
TestBasicSessions
(
t
*
testing
.
T
)
{
...
...
stat.go
View file @
b13118ca
...
...
@@ -3,7 +3,7 @@ package bitswap
import
(
"sort"
cid
"gx/ipfs/Qm
Np85zy9RLrQ5oQD4hPyS39ezrrXpcaa7R4Y9kxdWQLLQ
/go-cid"
cid
"gx/ipfs/Qm
eSrf6pzut73u6zLQkRFQ3ygt3k6XFT2kjdYP8Tnkwwyg
/go-cid"
)
type
Stat
struct
{
...
...
testnet/interface.go
View file @
b13118ca
...
...
@@ -2,8 +2,8 @@ package bitswap
import
(
bsnet
"github.com/ipfs/go-ipfs/exchange/bitswap/network"
"gx/ipfs/Qm
QgLZP9haZheimMHqqAjJh2LhRmNfEoZDfbtkpeMhi9xK/go-testutil
"
peer
"gx/ipfs/Qm
XYjuNuxVzXKJCfWasQk1RqkhVLDM9jtUKhqc2WPQmFSB/go-libp2p-peer
"
peer
"gx/ipfs/Qm
WNY7dV54ZDYmTA1ykVdwNCqC11mpU4zSUp6XDpLTH9eG/go-libp2p-peer
"
"gx/ipfs/Qm
eDA8gNhvRTsbrjEieay5wezupJDiky8xvCzDABbsGzmp/go-testutil
"
)
type
Network
interface
{
...
...
testnet/network_test.go
View file @
b13118ca
...
...
@@ -9,9 +9,9 @@ import (
bsnet
"github.com/ipfs/go-ipfs/exchange/bitswap/network"
mockrouting
"github.com/ipfs/go-ipfs/routing/mock"
delay
"github.com/ipfs/go-ipfs/thirdparty/delay"
testutil
"gx/ipfs/Qm
QgLZP9haZheimMHqqAjJh2LhRmNfEoZDfbtkpeMhi9xK/go-testutil
"
blocks
"gx/ipfs/Qm
Sn9Td7xgxm9EV7iEjTckpUWmWApggzPxu7eFGWkkpwin
/go-block-format"
peer
"gx/ipfs/Qm
XYjuNuxVzXKJCfWasQk1RqkhVLDM9jtUKhqc2WPQmFSB/go-libp2p-peer
"
peer
"gx/ipfs/Qm
WNY7dV54ZDYmTA1ykVdwNCqC11mpU4zSUp6XDpLTH9eG/go-libp2p-peer
"
blocks
"gx/ipfs/Qm
YsEQydGrsxNZfAiskvQ76N2xE9hDQtSAkRSynwMiUK3c
/go-block-format"
testutil
"gx/ipfs/Qm
eDA8gNhvRTsbrjEieay5wezupJDiky8xvCzDABbsGzmp/go-testutil
"
)
func
TestSendMessageAsyncButWaitForResponse
(
t
*
testing
.
T
)
{
...
...
testnet/peernet.go
View file @
b13118ca
...
...
@@ -5,10 +5,10 @@ import (
bsnet
"github.com/ipfs/go-ipfs/exchange/bitswap/network"
mockrouting
"github.com/ipfs/go-ipfs/routing/mock"
testutil
"gx/ipfs/QmQgLZP9haZheimMHqqAjJh2LhRmNfEoZDfbtkpeMhi9xK/go-testutil"
mockpeernet
"gx/ipfs/QmTzs3Gp2rU3HuNayjBVG7qBgbaKWE8bgtwJ7faRxAe9UP/go-libp2p/p2p/net/mock"
peer
"gx/ipfs/QmXYjuNuxVzXKJCfWasQk1RqkhVLDM9jtUKhqc2WPQmFSB/go-libp2p-peer"
peer
"gx/ipfs/QmWNY7dV54ZDYmTA1ykVdwNCqC11mpU4zSUp6XDpLTH9eG/go-libp2p-peer"
mockpeernet
"gx/ipfs/Qma23bpHwQrQyvKeBemaeJh7sAoRHggPkgnge1B9489ff5/go-libp2p/p2p/net/mock"
ds
"gx/ipfs/QmdHG8MAuARdGHxx4rPQASLcvhz24fzjSQq7AJRAQEorq5/go-datastore"
testutil
"gx/ipfs/QmeDA8gNhvRTsbrjEieay5wezupJDiky8xvCzDABbsGzmp/go-testutil"
)
type
peernet
struct
{
...
...
testnet/virtual.go
View file @
b13118ca
...
...
@@ -9,12 +9,12 @@ import (
mockrouting
"github.com/ipfs/go-ipfs/routing/mock"
delay
"github.com/ipfs/go-ipfs/thirdparty/delay"
cid
"gx/ipfs/QmNp85zy9RLrQ5oQD4hPyS39ezrrXpcaa7R4Y9kxdWQLLQ/go-cid"
routing
"gx/ipfs/QmPR2JzfKd9poHx9XBhzoFeBBC31ZM3W5iUPKJZWyaoZZm/go-libp2p-routing"
testutil
"gx/ipfs/QmQgLZP9haZheimMHqqAjJh2LhRmNfEoZDfbtkpeMhi9xK/go-testutil"
routing
"gx/ipfs/QmPCGUjMRuBcPybZFpjhzpifwPP9wPRoiy5geTQKU4vqWA/go-libp2p-routing"
ifconnmgr
"gx/ipfs/QmSAJm4QdTJ3EGF2cvgNcQyXTEbxqWSW1x4kCVV1aJQUQr/go-libp2p-interface-connmgr"
logging
"gx/ipfs/QmSpJByNKFX1sCsHBEp3R73FL4NF6FnQTEGyNAXHm2GS52/go-log"
ifconnmgr
"gx/ipfs/QmWfkNorhirGE1Qp3VwBWcnGaj4adv4hNqCYwabMrEYc21/go-libp2p-interface-connmgr"
peer
"gx/ipfs/QmXYjuNuxVzXKJCfWasQk1RqkhVLDM9jtUKhqc2WPQmFSB/go-libp2p-peer"
peer
"gx/ipfs/QmWNY7dV54ZDYmTA1ykVdwNCqC11mpU4zSUp6XDpLTH9eG/go-libp2p-peer"
testutil
"gx/ipfs/QmeDA8gNhvRTsbrjEieay5wezupJDiky8xvCzDABbsGzmp/go-testutil"
cid
"gx/ipfs/QmeSrf6pzut73u6zLQkRFQ3ygt3k6XFT2kjdYP8Tnkwwyg/go-cid"
)
var
log
=
logging
.
Logger
(
"bstestnet"
)
...
...
testutils.go
View file @
b13118ca
...
...
@@ -8,10 +8,10 @@ import (
tn
"github.com/ipfs/go-ipfs/exchange/bitswap/testnet"
datastore2
"github.com/ipfs/go-ipfs/thirdparty/datastore2"
delay
"github.com/ipfs/go-ipfs/thirdparty/delay"
testutil
"gx/ipfs/Qm
QgLZP9haZheimMHqqAjJh2LhRmNfEoZDfbtkpeMhi9xK
/go-testutil"
testutil
"gx/ipfs/Qm
eDA8gNhvRTsbrjEieay5wezupJDiky8xvCzDABbsGzmp
/go-testutil"
p
2ptestutil
"gx/ipfs/Qm
UUNDRYXgfqdjxTg79ogkciczU5y4WY1tKMU2vEX9CRN7
/go-libp2p-
netutil
"
p
eer
"gx/ipfs/Qm
XYjuNuxVzXKJCfWasQk1RqkhVLDM9jtUKhqc2WPQmFSB
/go-libp2p-
peer
"
p
eer
"gx/ipfs/Qm
WNY7dV54ZDYmTA1ykVdwNCqC11mpU4zSUp6XDpLTH9eG
/go-libp2p-
peer
"
p
2ptestutil
"gx/ipfs/Qm
ZTcPxK6VqrwY94JpKZPvEqAZ6tEr1rLrpcqJbbRZbg2V
/go-libp2p-
netutil
"
ds
"gx/ipfs/QmdHG8MAuARdGHxx4rPQASLcvhz24fzjSQq7AJRAQEorq5/go-datastore"
ds_sync
"gx/ipfs/QmdHG8MAuARdGHxx4rPQASLcvhz24fzjSQq7AJRAQEorq5/go-datastore/sync"
)
...
...
wantlist/wantlist.go
View file @
b13118ca
...
...
@@ -6,7 +6,7 @@ import (
"sort"
"sync"
cid
"gx/ipfs/Qm
Np85zy9RLrQ5oQD4hPyS39ezrrXpcaa7R4Y9kxdWQLLQ
/go-cid"
cid
"gx/ipfs/Qm
eSrf6pzut73u6zLQkRFQ3ygt3k6XFT2kjdYP8Tnkwwyg
/go-cid"
)
type
ThreadSafe
struct
{
...
...
wantlist/wantlist_test.go
View file @
b13118ca
...
...
@@ -3,7 +3,7 @@ package wantlist
import
(
"testing"
cid
"gx/ipfs/Qm
Np85zy9RLrQ5oQD4hPyS39ezrrXpcaa7R4Y9kxdWQLLQ
/go-cid"
cid
"gx/ipfs/Qm
eSrf6pzut73u6zLQkRFQ3ygt3k6XFT2kjdYP8Tnkwwyg
/go-cid"
)
var
testcids
[]
*
cid
.
Cid
...
...
wantmanager.go
View file @
b13118ca
...
...
@@ -10,9 +10,9 @@ import (
bsnet
"github.com/ipfs/go-ipfs/exchange/bitswap/network"
wantlist
"github.com/ipfs/go-ipfs/exchange/bitswap/wantlist"
cid
"gx/ipfs/QmNp85zy9RLrQ5oQD4hPyS39ezrrXpcaa7R4Y9kxdWQLLQ/go-cid"
metrics
"gx/ipfs/QmRg1gKTHzc3CZXSKzem8aR4E3TubFhbgXwfVuWnSK5CC5/go-metrics-interface"
peer
"gx/ipfs/QmXYjuNuxVzXKJCfWasQk1RqkhVLDM9jtUKhqc2WPQmFSB/go-libp2p-peer"
peer
"gx/ipfs/QmWNY7dV54ZDYmTA1ykVdwNCqC11mpU4zSUp6XDpLTH9eG/go-libp2p-peer"
cid
"gx/ipfs/QmeSrf6pzut73u6zLQkRFQ3ygt3k6XFT2kjdYP8Tnkwwyg/go-cid"
)
type
WantManager
struct
{
...
...
workers.go
View file @
b13118ca
...
...
@@ -8,11 +8,11 @@ import (
bsmsg
"github.com/ipfs/go-ipfs/exchange/bitswap/message"
cid
"gx/ipfs/QmNp85zy9RLrQ5oQD4hPyS39ezrrXpcaa7R4Y9kxdWQLLQ/go-cid"
process
"gx/ipfs/QmSF8fPo3jgVBAy8fpdjjYqgG87dkJgUprRBHRd2tmfgpP/goprocess"
procctx
"gx/ipfs/QmSF8fPo3jgVBAy8fpdjjYqgG87dkJgUprRBHRd2tmfgpP/goprocess/context"
logging
"gx/ipfs/QmSpJByNKFX1sCsHBEp3R73FL4NF6FnQTEGyNAXHm2GS52/go-log"
peer
"gx/ipfs/QmXYjuNuxVzXKJCfWasQk1RqkhVLDM9jtUKhqc2WPQmFSB/go-libp2p-peer"
peer
"gx/ipfs/QmWNY7dV54ZDYmTA1ykVdwNCqC11mpU4zSUp6XDpLTH9eG/go-libp2p-peer"
cid
"gx/ipfs/QmeSrf6pzut73u6zLQkRFQ3ygt3k6XFT2kjdYP8Tnkwwyg/go-cid"
)
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