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
52e146ca
Commit
52e146ca
authored
Sep 09, 2016
by
Jeromy Johnson
Committed by
GitHub
Sep 09, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3198 from geoah/chore/extract-key
Extract blocks/key to ipfs/go-key
parents
aa3684f8
56c1d0d8
Changes
20
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
26 additions
and
26 deletions
+26
-26
bitswap.go
bitswap.go
+3
-3
bitswap_test.go
bitswap_test.go
+1
-1
decision/bench_test.go
decision/bench_test.go
+1
-1
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
decision/peer_request_queue_test.go
decision/peer_request_queue_test.go
+1
-1
message/message.go
message/message.go
+1
-1
message/message_test.go
message/message_test.go
+1
-1
network/interface.go
network/interface.go
+1
-1
network/ipfs_impl.go
network/ipfs_impl.go
+1
-1
notifications/notifications.go
notifications/notifications.go
+1
-1
notifications/notifications_test.go
notifications/notifications_test.go
+1
-1
stat.go
stat.go
+1
-1
testnet/peernet.go
testnet/peernet.go
+1
-1
testnet/virtual.go
testnet/virtual.go
+1
-1
testutils.go
testutils.go
+2
-2
wantlist/wantlist.go
wantlist/wantlist.go
+1
-1
wantmanager.go
wantmanager.go
+1
-1
workers.go
workers.go
+3
-3
No files found.
bitswap.go
View file @
52e146ca
...
...
@@ -10,7 +10,6 @@ import (
blocks
"github.com/ipfs/go-ipfs/blocks"
blockstore
"github.com/ipfs/go-ipfs/blocks/blockstore"
key
"github.com/ipfs/go-ipfs/blocks/key"
exchange
"github.com/ipfs/go-ipfs/exchange"
decision
"github.com/ipfs/go-ipfs/exchange/bitswap/decision"
bsmsg
"github.com/ipfs/go-ipfs/exchange/bitswap/message"
...
...
@@ -20,9 +19,10 @@ import (
flags
"github.com/ipfs/go-ipfs/flags"
"github.com/ipfs/go-ipfs/thirdparty/delay"
loggables
"github.com/ipfs/go-ipfs/thirdparty/loggables"
key
"gx/ipfs/Qmce4Y4zg3sYr7xKM5UueS67vhNni6EeWgCRnb7MbLJMew/go-key"
process
"gx/ipfs/Qm
QopLATEYMNg7dVqZRNDfeE2S1yKy8zrRh5xnYiuqeZBn
/goprocess"
procctx
"gx/ipfs/Qm
QopLATEYMNg7dVqZRNDfeE2S1yKy8zrRh5xnYiuqeZBn
/goprocess/context"
process
"gx/ipfs/Qm
SF8fPo3jgVBAy8fpdjjYqgG87dkJgUprRBHRd2tmfgpP
/goprocess"
procctx
"gx/ipfs/Qm
SF8fPo3jgVBAy8fpdjjYqgG87dkJgUprRBHRd2tmfgpP
/goprocess/context"
logging
"gx/ipfs/QmSpJByNKFX1sCsHBEp3R73FL4NF6FnQTEGyNAXHm2GS52/go-log"
peer
"gx/ipfs/QmWtbQU15LaB5B1JC2F7TV9P4K88vD3PpA4AJrwfCjhML8/go-libp2p-peer"
context
"gx/ipfs/QmZy2y8t9zQH2a1b8q2ZSLKp17ATuJoCNxxyMFG5qFExpt/go-net/context"
...
...
bitswap_test.go
View file @
52e146ca
...
...
@@ -13,10 +13,10 @@ import (
blocks
"github.com/ipfs/go-ipfs/blocks"
blockstore
"github.com/ipfs/go-ipfs/blocks/blockstore"
blocksutil
"github.com/ipfs/go-ipfs/blocks/blocksutil"
key
"github.com/ipfs/go-ipfs/blocks/key"
tn
"github.com/ipfs/go-ipfs/exchange/bitswap/testnet"
mockrouting
"github.com/ipfs/go-ipfs/routing/mock"
delay
"github.com/ipfs/go-ipfs/thirdparty/delay"
key
"gx/ipfs/Qmce4Y4zg3sYr7xKM5UueS67vhNni6EeWgCRnb7MbLJMew/go-key"
p2ptestutil
"gx/ipfs/Qmf4ETeAWXuThBfWwonVyFqGFSgTWepUDEr1txcctvpTXS/go-libp2p/p2p/test/util"
)
...
...
decision/bench_test.go
View file @
52e146ca
...
...
@@ -4,10 +4,10 @@ import (
"math"
"testing"
key
"github.com/ipfs/go-ipfs/blocks/key"
"github.com/ipfs/go-ipfs/exchange/bitswap/wantlist"
"github.com/ipfs/go-ipfs/thirdparty/testutil"
"gx/ipfs/QmWtbQU15LaB5B1JC2F7TV9P4K88vD3PpA4AJrwfCjhML8/go-libp2p-peer"
key
"gx/ipfs/Qmce4Y4zg3sYr7xKM5UueS67vhNni6EeWgCRnb7MbLJMew/go-key"
)
// FWIW: At the time of this commit, including a timestamp in task increases
...
...
decision/engine_test.go
View file @
52e146ca
...
...
@@ -12,10 +12,10 @@ import (
blockstore
"github.com/ipfs/go-ipfs/blocks/blockstore"
message
"github.com/ipfs/go-ipfs/exchange/bitswap/message"
testutil
"github.com/ipfs/go-ipfs/thirdparty/testutil"
ds
"gx/ipfs/QmNgqJarToRiq2GBaPJhkmW4B5BxS5B74E1rkGvv2JoaTp/go-datastore"
dssync
"gx/ipfs/QmNgqJarToRiq2GBaPJhkmW4B5BxS5B74E1rkGvv2JoaTp/go-datastore/sync"
peer
"gx/ipfs/QmWtbQU15LaB5B1JC2F7TV9P4K88vD3PpA4AJrwfCjhML8/go-libp2p-peer"
context
"gx/ipfs/QmZy2y8t9zQH2a1b8q2ZSLKp17ATuJoCNxxyMFG5qFExpt/go-net/context"
ds
"gx/ipfs/QmbzuUusHqaLLoNTDEVLcSF6vZDHZDLPC7p4bztRvvkXxU/go-datastore"
dssync
"gx/ipfs/QmbzuUusHqaLLoNTDEVLcSF6vZDHZDLPC7p4bztRvvkXxU/go-datastore/sync"
)
type
peerAndEngine
struct
{
...
...
decision/ledger.go
View file @
52e146ca
...
...
@@ -4,9 +4,9 @@ import (
"sync"
"time"
key
"github.com/ipfs/go-ipfs/blocks/key"
wl
"github.com/ipfs/go-ipfs/exchange/bitswap/wantlist"
peer
"gx/ipfs/QmWtbQU15LaB5B1JC2F7TV9P4K88vD3PpA4AJrwfCjhML8/go-libp2p-peer"
key
"gx/ipfs/Qmce4Y4zg3sYr7xKM5UueS67vhNni6EeWgCRnb7MbLJMew/go-key"
)
// keySet is just a convenient alias for maps of keys, where we only care
...
...
decision/peer_request_queue.go
View file @
52e146ca
...
...
@@ -4,10 +4,10 @@ import (
"sync"
"time"
key
"github.com/ipfs/go-ipfs/blocks/key"
wantlist
"github.com/ipfs/go-ipfs/exchange/bitswap/wantlist"
pq
"github.com/ipfs/go-ipfs/thirdparty/pq"
peer
"gx/ipfs/QmWtbQU15LaB5B1JC2F7TV9P4K88vD3PpA4AJrwfCjhML8/go-libp2p-peer"
key
"gx/ipfs/Qmce4Y4zg3sYr7xKM5UueS67vhNni6EeWgCRnb7MbLJMew/go-key"
)
type
peerRequestQueue
interface
{
...
...
decision/peer_request_queue_test.go
View file @
52e146ca
...
...
@@ -7,9 +7,9 @@ import (
"strings"
"testing"
key
"github.com/ipfs/go-ipfs/blocks/key"
"github.com/ipfs/go-ipfs/exchange/bitswap/wantlist"
"github.com/ipfs/go-ipfs/thirdparty/testutil"
key
"gx/ipfs/Qmce4Y4zg3sYr7xKM5UueS67vhNni6EeWgCRnb7MbLJMew/go-key"
)
func
TestPushPop
(
t
*
testing
.
T
)
{
...
...
message/message.go
View file @
52e146ca
...
...
@@ -4,9 +4,9 @@ import (
"io"
blocks
"github.com/ipfs/go-ipfs/blocks"
key
"github.com/ipfs/go-ipfs/blocks/key"
pb
"github.com/ipfs/go-ipfs/exchange/bitswap/message/pb"
wantlist
"github.com/ipfs/go-ipfs/exchange/bitswap/wantlist"
key
"gx/ipfs/Qmce4Y4zg3sYr7xKM5UueS67vhNni6EeWgCRnb7MbLJMew/go-key"
inet
"gx/ipfs/Qmf4ETeAWXuThBfWwonVyFqGFSgTWepUDEr1txcctvpTXS/go-libp2p/p2p/net"
ggio
"gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV/gogo-protobuf/io"
...
...
message/message_test.go
View file @
52e146ca
...
...
@@ -7,8 +7,8 @@ import (
proto
"gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV/gogo-protobuf/proto"
blocks
"github.com/ipfs/go-ipfs/blocks"
key
"github.com/ipfs/go-ipfs/blocks/key"
pb
"github.com/ipfs/go-ipfs/exchange/bitswap/message/pb"
key
"gx/ipfs/Qmce4Y4zg3sYr7xKM5UueS67vhNni6EeWgCRnb7MbLJMew/go-key"
)
func
TestAppendWanted
(
t
*
testing
.
T
)
{
...
...
network/interface.go
View file @
52e146ca
package
network
import
(
key
"github.com/ipfs/go-ipfs/blocks/key"
bsmsg
"github.com/ipfs/go-ipfs/exchange/bitswap/message"
peer
"gx/ipfs/QmWtbQU15LaB5B1JC2F7TV9P4K88vD3PpA4AJrwfCjhML8/go-libp2p-peer"
context
"gx/ipfs/QmZy2y8t9zQH2a1b8q2ZSLKp17ATuJoCNxxyMFG5qFExpt/go-net/context"
key
"gx/ipfs/Qmce4Y4zg3sYr7xKM5UueS67vhNni6EeWgCRnb7MbLJMew/go-key"
protocol
"gx/ipfs/Qmf4ETeAWXuThBfWwonVyFqGFSgTWepUDEr1txcctvpTXS/go-libp2p/p2p/protocol"
)
...
...
network/ipfs_impl.go
View file @
52e146ca
...
...
@@ -3,9 +3,9 @@ package network
import
(
"io"
key
"github.com/ipfs/go-ipfs/blocks/key"
bsmsg
"github.com/ipfs/go-ipfs/exchange/bitswap/message"
routing
"github.com/ipfs/go-ipfs/routing"
key
"gx/ipfs/Qmce4Y4zg3sYr7xKM5UueS67vhNni6EeWgCRnb7MbLJMew/go-key"
pstore
"gx/ipfs/QmSZi9ygLohBUGyHMqE5N6eToPwqcg7bZQTULeVLFu7Q6d/go-libp2p-peerstore"
logging
"gx/ipfs/QmSpJByNKFX1sCsHBEp3R73FL4NF6FnQTEGyNAXHm2GS52/go-log"
...
...
notifications/notifications.go
View file @
52e146ca
...
...
@@ -3,8 +3,8 @@ package notifications
import
(
pubsub
"github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/briantigerchow/pubsub"
blocks
"github.com/ipfs/go-ipfs/blocks"
key
"github.com/ipfs/go-ipfs/blocks/key"
context
"gx/ipfs/QmZy2y8t9zQH2a1b8q2ZSLKp17ATuJoCNxxyMFG5qFExpt/go-net/context"
key
"gx/ipfs/Qmce4Y4zg3sYr7xKM5UueS67vhNni6EeWgCRnb7MbLJMew/go-key"
)
const
bufferSize
=
16
...
...
notifications/notifications_test.go
View file @
52e146ca
...
...
@@ -7,8 +7,8 @@ import (
blocks
"github.com/ipfs/go-ipfs/blocks"
blocksutil
"github.com/ipfs/go-ipfs/blocks/blocksutil"
key
"github.com/ipfs/go-ipfs/blocks/key"
context
"gx/ipfs/QmZy2y8t9zQH2a1b8q2ZSLKp17ATuJoCNxxyMFG5qFExpt/go-net/context"
key
"gx/ipfs/Qmce4Y4zg3sYr7xKM5UueS67vhNni6EeWgCRnb7MbLJMew/go-key"
)
func
TestDuplicates
(
t
*
testing
.
T
)
{
...
...
stat.go
View file @
52e146ca
package
bitswap
import
(
key
"g
ithub.com/ipfs/go-ipfs/blocks/
key"
key
"g
x/ipfs/Qmce4Y4zg3sYr7xKM5UueS67vhNni6EeWgCRnb7MbLJMew/go-
key"
"sort"
)
...
...
testnet/peernet.go
View file @
52e146ca
...
...
@@ -4,9 +4,9 @@ import (
bsnet
"github.com/ipfs/go-ipfs/exchange/bitswap/network"
mockrouting
"github.com/ipfs/go-ipfs/routing/mock"
testutil
"github.com/ipfs/go-ipfs/thirdparty/testutil"
ds
"gx/ipfs/QmNgqJarToRiq2GBaPJhkmW4B5BxS5B74E1rkGvv2JoaTp/go-datastore"
peer
"gx/ipfs/QmWtbQU15LaB5B1JC2F7TV9P4K88vD3PpA4AJrwfCjhML8/go-libp2p-peer"
context
"gx/ipfs/QmZy2y8t9zQH2a1b8q2ZSLKp17ATuJoCNxxyMFG5qFExpt/go-net/context"
ds
"gx/ipfs/QmbzuUusHqaLLoNTDEVLcSF6vZDHZDLPC7p4bztRvvkXxU/go-datastore"
mockpeernet
"gx/ipfs/Qmf4ETeAWXuThBfWwonVyFqGFSgTWepUDEr1txcctvpTXS/go-libp2p/p2p/net/mock"
)
...
...
testnet/virtual.go
View file @
52e146ca
...
...
@@ -3,7 +3,6 @@ package bitswap
import
(
"errors"
key
"github.com/ipfs/go-ipfs/blocks/key"
bsmsg
"github.com/ipfs/go-ipfs/exchange/bitswap/message"
bsnet
"github.com/ipfs/go-ipfs/exchange/bitswap/network"
routing
"github.com/ipfs/go-ipfs/routing"
...
...
@@ -12,6 +11,7 @@ import (
testutil
"github.com/ipfs/go-ipfs/thirdparty/testutil"
peer
"gx/ipfs/QmWtbQU15LaB5B1JC2F7TV9P4K88vD3PpA4AJrwfCjhML8/go-libp2p-peer"
context
"gx/ipfs/QmZy2y8t9zQH2a1b8q2ZSLKp17ATuJoCNxxyMFG5qFExpt/go-net/context"
key
"gx/ipfs/Qmce4Y4zg3sYr7xKM5UueS67vhNni6EeWgCRnb7MbLJMew/go-key"
)
func
VirtualNetwork
(
rs
mockrouting
.
Server
,
d
delay
.
D
)
Network
{
...
...
testutils.go
View file @
52e146ca
...
...
@@ -8,10 +8,10 @@ import (
datastore2
"github.com/ipfs/go-ipfs/thirdparty/datastore2"
delay
"github.com/ipfs/go-ipfs/thirdparty/delay"
testutil
"github.com/ipfs/go-ipfs/thirdparty/testutil"
ds
"gx/ipfs/QmNgqJarToRiq2GBaPJhkmW4B5BxS5B74E1rkGvv2JoaTp/go-datastore"
ds_sync
"gx/ipfs/QmNgqJarToRiq2GBaPJhkmW4B5BxS5B74E1rkGvv2JoaTp/go-datastore/sync"
peer
"gx/ipfs/QmWtbQU15LaB5B1JC2F7TV9P4K88vD3PpA4AJrwfCjhML8/go-libp2p-peer"
context
"gx/ipfs/QmZy2y8t9zQH2a1b8q2ZSLKp17ATuJoCNxxyMFG5qFExpt/go-net/context"
ds
"gx/ipfs/QmbzuUusHqaLLoNTDEVLcSF6vZDHZDLPC7p4bztRvvkXxU/go-datastore"
ds_sync
"gx/ipfs/QmbzuUusHqaLLoNTDEVLcSF6vZDHZDLPC7p4bztRvvkXxU/go-datastore/sync"
p2ptestutil
"gx/ipfs/Qmf4ETeAWXuThBfWwonVyFqGFSgTWepUDEr1txcctvpTXS/go-libp2p/p2p/test/util"
)
...
...
wantlist/wantlist.go
View file @
52e146ca
...
...
@@ -6,7 +6,7 @@ import (
"sort"
"sync"
key
"g
ithub.com/ipfs/go-ipfs/blocks/
key"
key
"g
x/ipfs/Qmce4Y4zg3sYr7xKM5UueS67vhNni6EeWgCRnb7MbLJMew/go-
key"
"gx/ipfs/QmZy2y8t9zQH2a1b8q2ZSLKp17ATuJoCNxxyMFG5qFExpt/go-net/context"
)
...
...
wantmanager.go
View file @
52e146ca
...
...
@@ -4,13 +4,13 @@ import (
"sync"
"time"
key
"github.com/ipfs/go-ipfs/blocks/key"
engine
"github.com/ipfs/go-ipfs/exchange/bitswap/decision"
bsmsg
"github.com/ipfs/go-ipfs/exchange/bitswap/message"
bsnet
"github.com/ipfs/go-ipfs/exchange/bitswap/network"
wantlist
"github.com/ipfs/go-ipfs/exchange/bitswap/wantlist"
peer
"gx/ipfs/QmWtbQU15LaB5B1JC2F7TV9P4K88vD3PpA4AJrwfCjhML8/go-libp2p-peer"
context
"gx/ipfs/QmZy2y8t9zQH2a1b8q2ZSLKp17ATuJoCNxxyMFG5qFExpt/go-net/context"
key
"gx/ipfs/Qmce4Y4zg3sYr7xKM5UueS67vhNni6EeWgCRnb7MbLJMew/go-key"
)
type
WantManager
struct
{
...
...
workers.go
View file @
52e146ca
...
...
@@ -4,14 +4,14 @@ import (
"sync"
"time"
process
"gx/ipfs/Qm
QopLATEYMNg7dVqZRNDfeE2S1yKy8zrRh5xnYiuqeZBn
/goprocess"
procctx
"gx/ipfs/Qm
QopLATEYMNg7dVqZRNDfeE2S1yKy8zrRh5xnYiuqeZBn
/goprocess/context"
process
"gx/ipfs/Qm
SF8fPo3jgVBAy8fpdjjYqgG87dkJgUprRBHRd2tmfgpP
/goprocess"
procctx
"gx/ipfs/Qm
SF8fPo3jgVBAy8fpdjjYqgG87dkJgUprRBHRd2tmfgpP
/goprocess/context"
context
"gx/ipfs/QmZy2y8t9zQH2a1b8q2ZSLKp17ATuJoCNxxyMFG5qFExpt/go-net/context"
key
"github.com/ipfs/go-ipfs/blocks/key"
wantlist
"github.com/ipfs/go-ipfs/exchange/bitswap/wantlist"
logging
"gx/ipfs/QmSpJByNKFX1sCsHBEp3R73FL4NF6FnQTEGyNAXHm2GS52/go-log"
peer
"gx/ipfs/QmWtbQU15LaB5B1JC2F7TV9P4K88vD3PpA4AJrwfCjhML8/go-libp2p-peer"
key
"gx/ipfs/Qmce4Y4zg3sYr7xKM5UueS67vhNni6EeWgCRnb7MbLJMew/go-key"
)
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