Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
G
go-ipfs
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
jihao
go-ipfs
Commits
17e886e2
Unverified
提交
17e886e2
authored
12月 05, 2019
作者:
Steven Allen
提交者:
GitHub
12月 05, 2019
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #6768 from ipfs/chore/update
chore(dep): update libp2p
上级
f7584ced
ab274664
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
48 行增加
和
41 行删除
+48
-41
config.yml
.circleci/config.yml
+7
-2
seccat.go
cmd/seccat/seccat.go
+2
-3
pubsub.go
core/coreapi/pubsub.go
+2
-0
main.go
docs/examples/go-ipfs-as-a-library/main.go
+2
-1
go.mod
go.mod
+13
-13
go.sum
go.sum
+0
-0
t0060-daemon.sh
test/sharness/t0060-daemon.sh
+18
-22
t0180-pubsub.sh
test/sharness/t0180-pubsub.sh
+4
-0
没有找到文件。
.circleci/config.yml
浏览文件 @
17e886e2
...
...
@@ -144,8 +144,6 @@ jobs:
-
*store_gomod
interop
:
executor
:
node
environment
:
IPFS_GO_EXEC
:
/tmp/circleci-workspace/bin/ipfs
parallelism
:
4
steps
:
-
*make_out_dirs
...
...
@@ -170,6 +168,11 @@ jobs:
paths
:
-
~/ipfs/go-ipfs/interop/node_modules
-
run
:
name
:
Installing js-ipfs
command
:
|
npm install ipfs ipfs-http-client
working_directory
:
~/ipfs/go-ipfs/interop
-
run
:
name
:
Installing reporting tools
command
:
|
npm install --save-dev mocha-junit-reporter@1.23.1 mocha-multi-reporters@1.1.0
...
...
@@ -185,6 +188,8 @@ jobs:
working_directory
:
~/ipfs/go-ipfs/interop
environment
:
IPFS_REUSEPORT
:
false
LIBP2P_ALLOW_WEAK_RSA_KEYS
:
true
IPFS_GO_EXEC
:
/tmp/circleci-workspace/bin/ipfs
-
store_test_results
:
path
:
/tmp/test-results
go-ipfs-api
:
...
...
cmd/seccat/seccat.go
浏览文件 @
17e886e2
...
...
@@ -10,7 +10,6 @@ package main
import
(
"context"
"errors"
"flag"
"fmt"
"io"
...
...
@@ -113,8 +112,8 @@ func main() {
}
func
setupPeer
(
a
args
)
(
peer
.
ID
,
pstore
.
Peerstore
,
error
)
{
if
a
.
keybits
<
2048
{
return
""
,
nil
,
errors
.
New
(
"bitsize less than 2048 is considered unsafe"
)
if
a
.
keybits
<
ci
.
MinRsaKeyBits
{
return
""
,
nil
,
ci
.
ErrRsaKeyTooSmall
}
out
(
"generating key pair..."
)
...
...
core/coreapi/pubsub.go
浏览文件 @
17e886e2
...
...
@@ -56,6 +56,7 @@ func (api *PubSubAPI) Publish(ctx context.Context, topic string, data []byte) er
return
err
}
//nolint deprecated
return
api
.
pubSub
.
Publish
(
topic
,
data
)
}
...
...
@@ -70,6 +71,7 @@ func (api *PubSubAPI) Subscribe(ctx context.Context, topic string, opts ...caopt
return
nil
,
err
}
//nolint deprecated
sub
,
err
:=
api
.
pubSub
.
Subscribe
(
topic
)
if
err
!=
nil
{
return
nil
,
err
...
...
docs/examples/go-ipfs-as-a-library/main.go
浏览文件 @
17e886e2
...
...
@@ -204,7 +204,8 @@ func main() {
fmt
.
Println
(
"-- Getting an IPFS node running -- "
)
ctx
,
_
:=
context
.
WithCancel
(
context
.
Background
())
ctx
,
cancel
:=
context
.
WithCancel
(
context
.
Background
())
defer
cancel
()
/*
// Spawn a node using the default path (~/.ipfs), assuming that a repo exists there already
...
...
go.mod
浏览文件 @
17e886e2
...
...
@@ -14,14 +14,14 @@ require (
github.com/gogo/protobuf v1.3.1
github.com/hashicorp/go-multierror v1.0.0
github.com/hashicorp/golang-lru v0.5.3
github.com/ipfs/go-bitswap v0.1.
9
github.com/ipfs/go-bitswap v0.1.
10
github.com/ipfs/go-block-format v0.0.2
github.com/ipfs/go-blockservice v0.1.2
github.com/ipfs/go-cid v0.0.3
github.com/ipfs/go-cidutil v0.0.2
github.com/ipfs/go-datastore v0.1.1
github.com/ipfs/go-detect-race v0.0.1
github.com/ipfs/go-ds-badger v0.0.
5
github.com/ipfs/go-ds-badger v0.0.
7
github.com/ipfs/go-ds-flatfs v0.1.0
github.com/ipfs/go-ds-leveldb v0.1.0
github.com/ipfs/go-ds-measure v0.0.2
...
...
@@ -30,7 +30,7 @@ require (
github.com/ipfs/go-ipfs-blockstore v0.1.0
github.com/ipfs/go-ipfs-chunker v0.0.3
github.com/ipfs/go-ipfs-cmds v0.1.1
github.com/ipfs/go-ipfs-config v0.0.1
1
github.com/ipfs/go-ipfs-config v0.0.1
2
github.com/ipfs/go-ipfs-ds-help v0.0.1
github.com/ipfs/go-ipfs-exchange-interface v0.0.1
github.com/ipfs/go-ipfs-exchange-offline v0.0.1
...
...
@@ -57,26 +57,26 @@ require (
github.com/jbenet/go-random v0.0.0-20190219211222-123a90aedc0c
github.com/jbenet/go-temp-err-catcher v0.0.0-20150120210811-aac704a3f4f2
github.com/jbenet/goprocess v0.1.3
github.com/libp2p/go-libp2p v0.4.
0
github.com/libp2p/go-libp2p v0.4.
2
github.com/libp2p/go-libp2p-autonat-svc v0.1.0
github.com/libp2p/go-libp2p-circuit v0.1.
3
github.com/libp2p/go-libp2p-circuit v0.1.
4
github.com/libp2p/go-libp2p-connmgr v0.1.1
github.com/libp2p/go-libp2p-core v0.2.5
github.com/libp2p/go-libp2p-http v0.1.4
github.com/libp2p/go-libp2p-kad-dht v0.
2
.1
github.com/libp2p/go-libp2p-kad-dht v0.
3
.1
github.com/libp2p/go-libp2p-kbucket v0.2.1
github.com/libp2p/go-libp2p-loggables v0.1.0
github.com/libp2p/go-libp2p-mplex v0.2.1
github.com/libp2p/go-libp2p-peerstore v0.1.
3
github.com/libp2p/go-libp2p-peerstore v0.1.
4
github.com/libp2p/go-libp2p-pnet v0.1.0
github.com/libp2p/go-libp2p-pubsub v0.
1.1
github.com/libp2p/go-libp2p-pubsub v0.
2.4
github.com/libp2p/go-libp2p-pubsub-router v0.1.0
github.com/libp2p/go-libp2p-quic-transport v0.2.2
github.com/libp2p/go-libp2p-record v0.1.
1
github.com/libp2p/go-libp2p-record v0.1.
2
github.com/libp2p/go-libp2p-routing-helpers v0.1.0
github.com/libp2p/go-libp2p-secio v0.2.
0
github.com/libp2p/go-libp2p-secio v0.2.
1
github.com/libp2p/go-libp2p-swarm v0.2.2
github.com/libp2p/go-libp2p-testing v0.1.
0
github.com/libp2p/go-libp2p-testing v0.1.
1
github.com/libp2p/go-libp2p-tls v0.1.1
github.com/libp2p/go-libp2p-yamux v0.2.1
github.com/libp2p/go-maddr-filter v0.0.5
...
...
@@ -85,10 +85,10 @@ require (
github.com/mitchellh/go-homedir v1.1.0
github.com/mr-tron/base58 v1.1.2
github.com/multiformats/go-multiaddr v0.1.2
github.com/multiformats/go-multiaddr-dns v0.
1
.0
github.com/multiformats/go-multiaddr-dns v0.
2
.0
github.com/multiformats/go-multiaddr-net v0.1.1
github.com/multiformats/go-multibase v0.0.1
github.com/multiformats/go-multihash v0.0.
8
github.com/multiformats/go-multihash v0.0.
9
github.com/opentracing/opentracing-go v1.1.0
github.com/pkg/errors v0.8.1
github.com/prometheus/client_golang v1.1.0
...
...
go.sum
浏览文件 @
17e886e2
差异被折叠。
点击展开。
test/sharness/t0060-daemon.sh
浏览文件 @
17e886e2
...
...
@@ -8,42 +8,38 @@ test_description="Test daemon command"
.
lib/test-lib.sh
test_expect_success
"test environment initialized"
'
export ORIG_IPFS_PATH="$IPFS_PATH"
test_expect_success
"create badger config"
'
ipfs init --profile=badgerds,test > /dev/null &&
cp "$IPFS_PATH/config" init-config
'
export ORIG_PATH="$(pwd)/.ipfs"
export IPFS_PATH="$ORIG_PATH"
export CLONE_PATH="$(pwd)/.ipfs-clone"
ipfs init --profile=badgerds > /dev/null
test_expect_success
"cleanup repo"
'
rm -rf "$IPFS_PATH"
'
export
IPFS_PATH
=
$CLONE_PATH
test_launch_ipfs_daemon
--init
--init-config
=
"
$ORIG_PATH
/config"
test_launch_ipfs_daemon
--init
--init-config
=
"
$(
pwd
)
/init-config"
--init-profile
=
test
test_kill_ipfs_daemon
test_expect_success
"daemon initialization with existing config works"
'
ipfs config "Datastore.Spec.child.path" >actual &&
test $(cat actual) = "badgerds"
test $(cat actual) = "badgerds" &&
ipfs config Addresses > orig_addrs
'
test_expect_success
"clean
up daemon clone
"
'
rm -rf "$
CLONE
_PATH"
test_expect_success
"clean
up repo
"
'
rm -rf "$
IPFS
_PATH"
'
test_launch_ipfs_daemon
--init
--init-config
=
"
$ORIG_PATH
/config"
--init-profile
=
randomports
test_launch_ipfs_daemon
--init
--init-config
=
"
$(
pwd
)
/init-config"
--init-profile
=
test
,randomports
test_kill_ipfs_daemon
test_expect_failure
"daemon initialization with existing config + profiles works"
'
ipfs config Addresses >clone_conf &&
IPFS_PATH=$ORIG_PATH &&
ipfs config Addresses >orig_conf &&
test_cmp clone_conf orig_conf
test_expect_success
"daemon initialization with existing config + profiles works"
'
ipfs config Addresses >new_addrs &&
test_expect_code 1 diff -q new_addrs orig_addrs
'
test_expect_success
"clean up test environment"
'
rm -rf "$CLONE_PATH"
rm -rf "$ORIG_PATH"
export IPFS_PATH=$ORIG_IPFS_PATH
test_expect_success
"cleanup repo"
'
rm -rf "$IPFS_PATH"
'
test_init_ipfs
...
...
test/sharness/t0180-pubsub.sh
浏览文件 @
17e886e2
...
...
@@ -10,6 +10,10 @@ test_expect_success 'init iptb' '
iptb testbed create -type localipfs -count $NUM_NODES -init
'
test_expect_success
'disable the DHT'
'
iptb run -- ipfs config Routing.Type none
'
run_pubsub_tests
()
{
test_expect_success
'peer ids'
'
PEERID_0=$(iptb attr get 0 id) &&
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论