Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
G
go-ipfs
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
jihao
go-ipfs
Commits
cc527da2
提交
cc527da2
authored
9月 11, 2019
作者:
Steven Allen
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'master' into feat/stabilize-dht
上级
566295c3
48a96bee
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
96 行增加
和
41 行删除
+96
-41
groups.go
core/node/groups.go
+2
-3
peerstore.go
core/node/libp2p/peerstore.go
+20
-0
go.mod
go.mod
+1
-10
go.sum
go.sum
+0
-0
Rules.mk
test/bin/Rules.mk
+48
-28
go.mod
test/dependencies/go.mod
+25
-0
go.sum
test/dependencies/go.sum
+0
-0
main.go
test/dependencies/pollEndpoint/main.go
+0
-0
没有找到文件。
core/node/groups.go
浏览文件 @
cc527da2
...
...
@@ -10,7 +10,6 @@ import (
"github.com/ipfs/go-ipfs-config"
util
"github.com/ipfs/go-ipfs-util"
peer
"github.com/libp2p/go-libp2p-core/peer"
"github.com/libp2p/go-libp2p-peerstore/pstoremem"
pubsub
"github.com/libp2p/go-libp2p-pubsub"
"github.com/ipfs/go-ipfs/core/node/libp2p"
...
...
@@ -161,7 +160,7 @@ func Identity(cfg *config.Config) fx.Option {
if
cfg
.
Identity
.
PrivKey
==
""
{
return
fx
.
Options
(
// No PK (usually in tests)
fx
.
Provide
(
PeerID
(
id
)),
fx
.
Provide
(
pstoremem
.
New
Peerstore
),
fx
.
Provide
(
libp2p
.
Peerstore
),
)
}
...
...
@@ -173,7 +172,7 @@ func Identity(cfg *config.Config) fx.Option {
return
fx
.
Options
(
// Full identity
fx
.
Provide
(
PeerID
(
id
)),
fx
.
Provide
(
PrivateKey
(
sk
)),
fx
.
Provide
(
pstoremem
.
New
Peerstore
),
fx
.
Provide
(
libp2p
.
Peerstore
),
fx
.
Invoke
(
libp2p
.
PstoreAddSelfKeys
),
)
...
...
core/node/libp2p/peerstore.go
0 → 100644
浏览文件 @
cc527da2
package
libp2p
import
(
"context"
"github.com/libp2p/go-libp2p-core/peerstore"
"github.com/libp2p/go-libp2p-peerstore/pstoremem"
"go.uber.org/fx"
)
func
Peerstore
(
lc
fx
.
Lifecycle
)
peerstore
.
Peerstore
{
pstore
:=
pstoremem
.
NewPeerstore
()
lc
.
Append
(
fx
.
Hook
{
OnStop
:
func
(
ctx
context
.
Context
)
error
{
return
pstore
.
Close
()
},
})
return
pstore
}
go.mod
浏览文件 @
cc527da2
...
...
@@ -3,7 +3,6 @@ module github.com/ipfs/go-ipfs
require (
bazil.org/fuse v0.0.0-20180421153158-65cc252bf669
github.com/AndreasBriese/bbloom v0.0.0-20190823232136-616930265c33 // indirect
github.com/Kubuxu/gocovmerge v0.0.0-20161216165753-7ecaa51963cd
github.com/blang/semver v3.5.1+incompatible
github.com/bren2010/proquint v0.0.0-20160323162903-38337c27106d
github.com/dustin/go-humanize v1.0.0
...
...
@@ -12,7 +11,6 @@ require (
github.com/fsnotify/fsnotify v1.4.7
github.com/go-bindata/go-bindata v3.1.1+incompatible
github.com/gogo/protobuf v1.2.1
github.com/golangci/golangci-lint v1.17.1
github.com/hashicorp/go-multierror v1.0.0
github.com/hashicorp/golang-lru v0.5.3
github.com/ipfs/go-bitswap v0.1.8
...
...
@@ -52,13 +50,9 @@ require (
github.com/ipfs/go-path v0.0.7
github.com/ipfs/go-unixfs v0.2.1
github.com/ipfs/go-verifcid v0.0.1
github.com/ipfs/hang-fds v0.0.1
github.com/ipfs/interface-go-ipfs-core v0.2.2
github.com/ipfs/iptb v1.4.0
github.com/ipfs/iptb-plugins v0.1.0
github.com/jbenet/go-is-domain v1.0.2
github.com/jbenet/go-random v0.0.0-20190219211222-123a90aedc0c
github.com/jbenet/go-random-files v0.0.0-20190219210431-31b3f20ebded
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.3.2-0.20190828034358-8077b796691b
...
...
@@ -108,13 +102,10 @@ require (
go.uber.org/goleak v0.10.0 // indirect
go.uber.org/multierr v1.1.0 // indirect
go4.org v0.0.0-20190313082347-94abd6928b1d // indirect
golang.org/x/sync v0.0.0-20190423024810-112230192c58 // indirect
golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb
golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac // indirect
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7 // indirect
gopkg.in/cheggaaa/pb.v1 v1.0.28
gotest.tools/gotestsum v0.3.4
)
replace github.com/golangci/golangci-lint => github.com/mhutchinson/golangci-lint v1.17.2-0.20190819125825-d18f2136e32b
go 1.12
go.sum
浏览文件 @
cc527da2
差异被折叠。
点击展开。
test/bin/Rules.mk
浏览文件 @
cc527da2
...
...
@@ -2,60 +2,80 @@ include mk/header.mk
TGTS_$(d)
:
=
$(d)/pollEndpoint: thirdparty/pollEndpoint
$(go-build-relative)
define
go-build-testdep
OUT
=
"
$(CURDIR)
/
$@
"
;
\
cd
"test/dependencies"
;
\
$(GOCC)
build
$
(
go-flags-with-tags
)
-o
"
$$
{OUT}"
"
$<
"
endef
.PHONY
:
github.com/ipfs/go-ipfs/test/dependencies/pollEndpoint
$(d)/pollEndpoint
:
github.com/ipfs/go-ipfs/test/dependencies/pollEndpoint
$
(
go-build-testdep
)
TGTS_$(d)
+=
$(d)/pollEndpoint
$(d)/go-sleep: test/dependencies/go-sleep
$(go-build-relative)
.PHONY
:
github.com/ipfs/go-ipfs/test/dependencies/go-sleep
$(d)/go-sleep
:
github.com/ipfs/go-ipfs/test/dependencies/go-sleep
$
(
go-build-testdep
)
TGTS_$(d)
+=
$(d)/go-sleep
$(d)/go-timeout: test/dependencies/go-timeout
$(go-build-relative)
.PHONY
:
github.com/ipfs/go-ipfs/test/dependencies/go-timeout
$(d)/go-timeout
:
github.com/ipfs/go-ipfs/test/dependencies/go-timeout
$
(
go-build-testdep
)
TGTS_$(d)
+=
$(d)/go-timeout
$(d)/iptb: test/dependencies/iptb
$(go-build-relative)
.PHONY
:
github.com/ipfs/go-ipfs/test/dependencies/iptb
$(d)/iptb
:
github.com/ipfs/go-ipfs/test/dependencies/iptb
$
(
go-build-testdep
)
TGTS_$(d)
+=
$(d)/iptb
$(d)/ma-pipe-unidir: test/dependencies/ma-pipe-unidir
$(go-build-relative)
.PHONY
:
github.com/ipfs/go-ipfs/test/dependencies/ma-pipe-unidir
$(d)/ma-pipe-unidir
:
github.com/ipfs/go-ipfs/test/dependencies/ma-pipe-unidir
$
(
go-build-testdep
)
TGTS_$(d)
+=
$(d)/ma-pipe-unidir
$(d)/json-to-junit: test/dependencies/json-to-junit
$(go-build-relative)
.PHONY
:
github.com/ipfs/go-ipfs/test/dependencies/json-to-junit
$(d)/json-to-junit
:
github.com/ipfs/go-ipfs/test/dependencies/json-to-junit
$
(
go-build-testdep
)
TGTS_$(d)
+=
$(d)/json-to-junit
$(d)/gotestsum:
$(call go-build,gotest.tools/gotestsum)
.PHONY
:
gotest.tools/gotestsum
$(d)/gotestsum
:
gotest.tools/gotestsum
$
(
go-build-testdep
)
TGTS_$(d)
+=
$(d)/gotestsum
$(d)/hang-fds:
$(call go-build,github.com/ipfs/hang-fds)
.PHONY
:
github.com/ipfs/hang-fds
$(d)/hang-fds
:
github.com/ipfs/hang-fds
$
(
go-build-testdep
)
TGTS_$(d)
+=
$(d)/hang-fds
$(d)/multihash:
$(call go-build,github.com/multiformats/go-multihash/multihash)
.PHONY
:
github.com/multiformats/go-multihash/multihash
$(d)/multihash
:
github.com/multiformats/go-multihash/multihash
$
(
go-build-testdep
)
TGTS_$(d)
+=
$(d)/multihash
$(d)/cid-fmt:
$(call go-build,github.com/ipfs/go-cidutil/cid-fmt)
.PHONY
:
github.com/ipfs/go-cidutil/cid-fmt
$(d)/cid-fmt
:
github.com/ipfs/go-cidutil/cid-fmt
$
(
go-build-testdep
)
TGTS_$(d)
+=
$(d)/cid-fmt
$(d)/random:
$(call go-build,github.com/jbenet/go-random/random)
.PHONY
:
github.com/jbenet/go-random/random
$(d)/random
:
github.com/jbenet/go-random/random
$
(
go-build-testdep
)
TGTS_$(d)
+=
$(d)/random
$(d)/random-files:
$(call go-build,github.com/jbenet/go-random-files/random-files)
.PHONY
:
github.com/jbenet/go-random-files/random-files
$(d)/random-files
:
github.com/jbenet/go-random-files/random-files
$
(
go-build-testdep
)
TGTS_$(d)
+=
$(d)/random-files
$(d)/gocovmerge:
$(call go-build,github.com/Kubuxu/gocovmerge)
.PHONY
:
github.com/Kubuxu/gocovmerge
$(d)/gocovmerge
:
github.com/Kubuxu/gocovmerge
$
(
go-build-testdep
)
TGTS_$(d)
+=
$(d)/gocovmerge
$(d)/golangci-lint:
$(call go-build,github.com/golangci/golangci-lint/cmd/golangci-lint)
.PHONY
:
github.com/golangci/golangci-lint/cmd/golangci-lint
$(d)/golangci-lint
:
github.com/golangci/golangci-lint/cmd/golangci-lint
$
(
go-build-testdep
)
TGTS_$(d)
+=
$(d)/golangci-lint
$(TGTS_$(d))
:
$$(DEPS_GO)
...
...
test/dependencies/go.mod
0 → 100644
浏览文件 @
cc527da2
module github.com/ipfs/go-ipfs/test/dependencies
go 1.13
require (
github.com/Kubuxu/gocovmerge v0.0.0-20161216165753-7ecaa51963cd
github.com/golangci/golangci-lint v1.18.0
github.com/ipfs/go-cidutil v0.0.2
github.com/ipfs/go-log v0.0.1
github.com/ipfs/hang-fds v0.0.1
github.com/ipfs/iptb v1.4.0
github.com/ipfs/iptb-plugins v0.2.0
github.com/jbenet/go-random v0.0.0-20190219211222-123a90aedc0c
github.com/jbenet/go-random-files v0.0.0-20190219210431-31b3f20ebded
github.com/multiformats/go-multiaddr v0.0.4
github.com/multiformats/go-multiaddr-net v0.0.1
github.com/multiformats/go-multihash v0.0.7
gotest.tools/gotestsum v0.3.5
)
// golangci-lint likes replace directives.
replace (
github.com/ultraware/funlen => github.com/golangci/funlen v0.0.0-20190909161642-5e59b9546114
golang.org/x/tools => github.com/golangci/tools v0.0.0-20190910062050-3540c026601b
)
test/dependencies/go.sum
0 → 100644
浏览文件 @
cc527da2
差异被折叠。
点击展开。
t
hirdparty
/pollEndpoint/main.go
→
t
est/dependencies
/pollEndpoint/main.go
浏览文件 @
cc527da2
File moved
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论