Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
G
go-ipfs
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
jihao
go-ipfs
Commits
fd0c06a8
提交
fd0c06a8
authored
4月 03, 2019
作者:
Łukasz Magiera
提交者:
Steven Allen
4月 17, 2019
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Remove DI module dependency on BuildCfg
License: MIT Signed-off-by:
Łukasz Magiera
<
magik6k@gmail.com
>
上级
7046626e
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
141 行增加
和
124 行删除
+141
-124
builder.go
core/builder.go
+12
-8
groups.go
core/node/groups.go
+41
-23
libp2p.go
core/node/libp2p.go
+51
-58
storage.go
core/node/storage.go
+37
-35
没有找到文件。
core/builder.go
浏览文件 @
fd0c06a8
...
@@ -105,18 +105,22 @@ func NewNode(ctx context.Context, cfg *BuildCfg) (*IpfsNode, error) {
...
@@ -105,18 +105,22 @@ func NewNode(ctx context.Context, cfg *BuildCfg) (*IpfsNode, error) {
return
cfg
.
Repo
return
cfg
.
Repo
})
})
// TODO: Remove this, use only for passing node config
cfgOption
:=
fx
.
Provide
(
func
()
*
node
.
BuildCfg
{
return
(
*
node
.
BuildCfg
)(
cfg
)
})
metricsCtx
:=
fx
.
Provide
(
func
()
node
.
MetricsCtx
{
metricsCtx
:=
fx
.
Provide
(
func
()
node
.
MetricsCtx
{
return
node
.
MetricsCtx
(
ctx
)
return
node
.
MetricsCtx
(
ctx
)
})
})
hostOption
:=
fx
.
Provide
(
func
()
node
.
HostOption
{
return
cfg
.
Host
})
routingOption
:=
fx
.
Provide
(
func
()
node
.
RoutingOption
{
return
cfg
.
Routing
})
params
:=
fx
.
Options
(
params
:=
fx
.
Options
(
repoOption
,
repoOption
,
cfgOption
,
hostOption
,
routingOption
,
metricsCtx
,
metricsCtx
,
)
)
...
@@ -137,10 +141,10 @@ func NewNode(ctx context.Context, cfg *BuildCfg) (*IpfsNode, error) {
...
@@ -137,10 +141,10 @@ func NewNode(ctx context.Context, cfg *BuildCfg) (*IpfsNode, error) {
fx
.
Provide
(
baseProcess
),
fx
.
Provide
(
baseProcess
),
params
,
params
,
node
.
Storage
,
node
.
Storage
((
*
node
.
BuildCfg
)(
cfg
))
,
node
.
Identity
,
node
.
Identity
,
node
.
IPNS
,
node
.
IPNS
,
node
.
Networked
(
cfg
.
Online
),
node
.
Networked
(
(
*
node
.
BuildCfg
)(
cfg
)
),
fx
.
Invoke
(
setupSharding
),
fx
.
Invoke
(
setupSharding
),
...
...
core/node/groups.go
浏览文件 @
fd0c06a8
...
@@ -9,24 +9,20 @@ import (
...
@@ -9,24 +9,20 @@ import (
"github.com/ipfs/go-ipfs/provider"
"github.com/ipfs/go-ipfs/provider"
)
)
var
LibP2P
=
fx
.
Options
(
var
Base
LibP2P
=
fx
.
Options
(
fx
.
Provide
(
P2PAddrFilters
),
fx
.
Provide
(
P2PAddrFilters
),
fx
.
Provide
(
P2PBandwidthCounter
),
fx
.
Provide
(
P2PBandwidthCounter
),
fx
.
Provide
(
P2PPNet
),
fx
.
Provide
(
P2PPNet
),
fx
.
Provide
(
P2PAddrsFactory
),
fx
.
Provide
(
P2PAddrsFactory
),
fx
.
Provide
(
P2PConnectionManager
),
fx
.
Provide
(
P2PConnectionManager
),
fx
.
Provide
(
P2PSmuxTransport
),
fx
.
Provide
(
P2PNatPortMap
),
fx
.
Provide
(
P2PNatPortMap
),
fx
.
Provide
(
P2PRelay
),
fx
.
Provide
(
P2PRelay
),
fx
.
Provide
(
P2PAutoRealy
),
fx
.
Provide
(
P2PAutoRealy
),
fx
.
Provide
(
P2PDefaultTransports
),
fx
.
Provide
(
P2PDefaultTransports
),
fx
.
Provide
(
P2PQUIC
),
fx
.
Provide
(
P2PQUIC
),
fx
.
Provide
(
P2PHostOption
),
fx
.
Provide
(
P2PHost
),
fx
.
Provide
(
P2PHost
),
fx
.
Provide
(
P2POnlineRouting
),
fx
.
Provide
(
Pubsub
),
fx
.
Provide
(
NewDiscoveryHandler
),
fx
.
Provide
(
NewDiscoveryHandler
),
fx
.
Invoke
(
AutoNATService
),
fx
.
Invoke
(
AutoNATService
),
...
@@ -35,12 +31,26 @@ var LibP2P = fx.Options(
...
@@ -35,12 +31,26 @@ var LibP2P = fx.Options(
fx
.
Invoke
(
SetupDiscovery
),
fx
.
Invoke
(
SetupDiscovery
),
)
)
var
Storage
=
fx
.
Options
(
func
LibP2P
(
cfg
*
BuildCfg
)
fx
.
Option
{
fx
.
Provide
(
RepoConfig
),
return
fx
.
Options
(
fx
.
Provide
(
DatastoreCtor
),
BaseLibP2P
,
fx
.
Provide
(
BaseBlockstoreCtor
),
fx
.
Provide
(
GcBlockstoreCtor
),
MaybeProvide
(
P2PNoSecurity
,
cfg
.
DisableEncryptedConnections
),
)
MaybeProvide
(
Pubsub
,
cfg
.
getOpt
(
"pubsub"
)
||
cfg
.
getOpt
(
"ipnsps"
)),
fx
.
Provide
(
P2PSmuxTransport
(
cfg
.
getOpt
(
"mplex"
))),
fx
.
Provide
(
P2POnlineRouting
(
cfg
.
getOpt
(
"ipnsps"
))),
)
}
func
Storage
(
cfg
*
BuildCfg
)
fx
.
Option
{
return
fx
.
Options
(
fx
.
Provide
(
RepoConfig
),
fx
.
Provide
(
DatastoreCtor
),
fx
.
Provide
(
BaseBlockstoreCtor
(
cfg
.
Permanent
,
cfg
.
NilRepo
)),
fx
.
Provide
(
GcBlockstoreCtor
),
)
}
var
Identity
=
fx
.
Options
(
var
Identity
=
fx
.
Options
(
fx
.
Provide
(
PeerID
),
fx
.
Provide
(
PeerID
),
...
@@ -61,18 +71,19 @@ var Providers = fx.Options(
...
@@ -61,18 +71,19 @@ var Providers = fx.Options(
fx
.
Invoke
(
provider
.
Provider
.
Run
),
fx
.
Invoke
(
provider
.
Provider
.
Run
),
)
)
var
Online
=
fx
.
Options
(
func
Online
(
cfg
*
BuildCfg
)
fx
.
Option
{
fx
.
Provide
(
OnlineExchangeCtor
),
return
fx
.
Options
(
fx
.
Provide
(
OnlineNamesysCtor
),
fx
.
Provide
(
OnlineExchangeCtor
),
fx
.
Provide
(
OnlineNamesysCtor
),
fx
.
Invoke
(
IpnsRepublisher
),
fx
.
Invoke
(
IpnsRepublisher
),
fx
.
Provide
(
p2p
.
NewP2P
),
fx
.
Provide
(
p2p
.
NewP2P
),
LibP2P
,
Providers
,
)
LibP2P
(
cfg
),
Providers
,
)
}
var
Offline
=
fx
.
Options
(
var
Offline
=
fx
.
Options
(
fx
.
Provide
(
offline
.
Exchange
),
fx
.
Provide
(
offline
.
Exchange
),
fx
.
Provide
(
OfflineNamesysCtor
),
fx
.
Provide
(
OfflineNamesysCtor
),
...
@@ -80,9 +91,16 @@ var Offline = fx.Options(
...
@@ -80,9 +91,16 @@ var Offline = fx.Options(
fx
.
Provide
(
provider
.
NewOfflineProvider
),
fx
.
Provide
(
provider
.
NewOfflineProvider
),
)
)
func
Networked
(
online
bool
)
fx
.
Option
{
func
Networked
(
cfg
*
BuildCfg
)
fx
.
Option
{
if
o
nline
{
if
cfg
.
O
nline
{
return
Online
return
Online
(
cfg
)
}
}
return
Offline
return
Offline
}
}
func
MaybeProvide
(
opt
interface
{},
enable
bool
)
fx
.
Option
{
if
enable
{
return
fx
.
Provide
(
opt
)
}
return
fx
.
Options
()
}
core/node/libp2p.go
浏览文件 @
fd0c06a8
...
@@ -320,9 +320,11 @@ func makeSmuxTransportOption(mplexExp bool) libp2p.Option {
...
@@ -320,9 +320,11 @@ func makeSmuxTransportOption(mplexExp bool) libp2p.Option {
return
libp2p
.
ChainOptions
(
opts
...
)
return
libp2p
.
ChainOptions
(
opts
...
)
}
}
func
P2PSmuxTransport
(
bcfg
*
BuildCfg
)
(
opts
Libp2pOpts
,
err
error
)
{
func
P2PSmuxTransport
(
mplex
bool
)
func
()
(
opts
Libp2pOpts
,
err
error
)
{
opts
.
Opts
=
append
(
opts
.
Opts
,
makeSmuxTransportOption
(
bcfg
.
getOpt
(
"mplex"
)))
return
func
()
(
opts
Libp2pOpts
,
err
error
)
{
return
opts
.
Opts
=
append
(
opts
.
Opts
,
makeSmuxTransportOption
(
mplex
))
return
}
}
}
func
P2PNatPortMap
(
cfg
*
config
.
Config
)
(
opts
Libp2pOpts
,
err
error
)
{
func
P2PNatPortMap
(
cfg
*
config
.
Config
)
(
opts
Libp2pOpts
,
err
error
)
{
...
@@ -366,15 +368,23 @@ func P2PQUIC(cfg *config.Config) (opts Libp2pOpts, err error) {
...
@@ -366,15 +368,23 @@ func P2PQUIC(cfg *config.Config) (opts Libp2pOpts, err error) {
return
return
}
}
func
P2PNoSecurity
()
(
opts
Libp2pOpts
)
{
opts
.
Opts
=
append
(
opts
.
Opts
,
libp2p
.
NoSecurity
)
// TODO: shouldn't this be Errorf to guarantee visibility?
log
.
Warningf
(
`Your IPFS node has been configured to run WITHOUT ENCRYPTED CONNECTIONS.
You will not be able to connect to any nodes configured to use encrypted connections`
)
return
opts
}
type
P2PHostIn
struct
{
type
P2PHostIn
struct
{
fx
.
In
fx
.
In
BCfg
*
BuildCfg
Repo
repo
.
Repo
Repo
repo
.
Repo
Validator
record
.
Validator
Validator
record
.
Validator
HostOption
HostOption
HostOption
Host
Option
RoutingOption
Routing
Option
ID
peer
.
ID
ID
peer
.
ID
Peerstore
peerstore
.
Peerstore
Peerstore
peerstore
.
Peerstore
Opts
[][]
libp2p
.
Option
`group:"libp2p"`
Opts
[][]
libp2p
.
Option
`group:"libp2p"`
}
}
...
@@ -404,7 +414,7 @@ func P2PHost(mctx MetricsCtx, lc fx.Lifecycle, params P2PHostIn) (out P2PHostOut
...
@@ -404,7 +414,7 @@ func P2PHost(mctx MetricsCtx, lc fx.Lifecycle, params P2PHostIn) (out P2PHostOut
})
})
opts
=
append
(
opts
,
libp2p
.
Routing
(
func
(
h
host
.
Host
)
(
routing
.
PeerRouting
,
error
)
{
opts
=
append
(
opts
,
libp2p
.
Routing
(
func
(
h
host
.
Host
)
(
routing
.
PeerRouting
,
error
)
{
r
,
err
:=
params
.
BCfg
.
Routing
(
ctx
,
h
,
params
.
Repo
.
Datastore
(),
params
.
Validator
)
r
,
err
:=
params
.
RoutingOption
(
ctx
,
h
,
params
.
Repo
.
Datastore
(),
params
.
Validator
)
out
.
Routing
=
r
out
.
Routing
=
r
return
r
,
err
return
r
,
err
}))
}))
...
@@ -417,7 +427,7 @@ func P2PHost(mctx MetricsCtx, lc fx.Lifecycle, params P2PHostIn) (out P2PHostOut
...
@@ -417,7 +427,7 @@ func P2PHost(mctx MetricsCtx, lc fx.Lifecycle, params P2PHostIn) (out P2PHostOut
// this code is necessary just for tests: mock network constructions
// this code is necessary just for tests: mock network constructions
// ignore the libp2p constructor options that actually construct the routing!
// ignore the libp2p constructor options that actually construct the routing!
if
out
.
Routing
==
nil
{
if
out
.
Routing
==
nil
{
r
,
err
:=
params
.
BCfg
.
Routing
(
ctx
,
out
.
Host
,
params
.
Repo
.
Datastore
(),
params
.
Validator
)
r
,
err
:=
params
.
RoutingOption
(
ctx
,
out
.
Host
,
params
.
Repo
.
Datastore
(),
params
.
Validator
)
if
err
!=
nil
{
if
err
!=
nil
{
return
P2PHostOut
{},
err
return
P2PHostOut
{},
err
}
}
...
@@ -461,11 +471,10 @@ func P2PHost(mctx MetricsCtx, lc fx.Lifecycle, params P2PHostIn) (out P2PHostOut
...
@@ -461,11 +471,10 @@ func P2PHost(mctx MetricsCtx, lc fx.Lifecycle, params P2PHostIn) (out P2PHostOut
type
p2pRoutingIn
struct
{
type
p2pRoutingIn
struct
{
fx
.
In
fx
.
In
BCfg
*
BuildCfg
Repo
repo
.
Repo
Repo
repo
.
Repo
Validator
record
.
Validator
Validator
record
.
Validator
Host
host
.
Host
Host
host
.
Host
PubSub
*
pubsub
.
PubSub
PubSub
*
pubsub
.
PubSub
`optional:"true"`
BaseRouting
BaseRouting
BaseRouting
BaseRouting
}
}
...
@@ -474,36 +483,38 @@ type p2pRoutingOut struct {
...
@@ -474,36 +483,38 @@ type p2pRoutingOut struct {
fx
.
Out
fx
.
Out
IpfsRouting
routing
.
IpfsRouting
IpfsRouting
routing
.
IpfsRouting
PSRouter
*
namesys
.
PubsubValueStore
// TODO: optional
PSRouter
*
namesys
.
PubsubValueStore
}
}
func
P2POnlineRouting
(
mctx
MetricsCtx
,
lc
fx
.
Lifecycle
,
in
p2pRoutingIn
)
(
out
p2pRoutingOut
)
{
func
P2POnlineRouting
(
ipnsps
bool
)
func
(
mctx
MetricsCtx
,
lc
fx
.
Lifecycle
,
in
p2pRoutingIn
)
(
out
p2pRoutingOut
)
{
out
.
IpfsRouting
=
in
.
BaseRouting
return
func
(
mctx
MetricsCtx
,
lc
fx
.
Lifecycle
,
in
p2pRoutingIn
)
(
out
p2pRoutingOut
)
{
out
.
IpfsRouting
=
in
.
BaseRouting
if
in
.
BCfg
.
getOpt
(
"ipnsps"
)
{
out
.
PSRouter
=
namesys
.
NewPubsubValueStore
(
if
ipnsps
{
lifecycleCtx
(
mctx
,
lc
),
out
.
PSRouter
=
namesys
.
NewPubsubValueStore
(
in
.
Host
,
lifecycleCtx
(
mctx
,
lc
),
in
.
BaseRouting
,
in
.
Host
,
in
.
PubSub
,
in
.
BaseRouting
,
in
.
Validator
,
in
.
PubSub
,
)
in
.
Validator
,
)
out
.
IpfsRouting
=
routinghelpers
.
Tiered
{
Routers
:
[]
routing
.
IpfsRouting
{
out
.
IpfsRouting
=
routinghelpers
.
Tiered
{
// Always check pubsub first.
Routers
:
[]
routing
.
IpfsRouting
{
&
routinghelpers
.
Compose
{
// Always check pubsub first.
ValueStore
:
&
routinghelpers
.
LimitedValueStore
{
&
routinghelpers
.
Compose
{
ValueStore
:
out
.
PSRouter
,
ValueStore
:
&
routinghelpers
.
LimitedValueStore
{
Namespaces
:
[]
string
{
"ipns"
},
ValueStore
:
out
.
PSRouter
,
Namespaces
:
[]
string
{
"ipns"
},
},
},
},
in
.
BaseRouting
,
},
},
in
.
BaseRouting
,
Validator
:
in
.
Validator
,
},
}
Validator
:
in
.
Validator
,
}
}
return
out
}
}
return
out
}
}
func
AutoNATService
(
mctx
MetricsCtx
,
lc
fx
.
Lifecycle
,
cfg
*
config
.
Config
,
host
host
.
Host
)
error
{
func
AutoNATService
(
mctx
MetricsCtx
,
lc
fx
.
Lifecycle
,
cfg
*
config
.
Config
,
host
host
.
Host
)
error
{
...
@@ -519,11 +530,7 @@ func AutoNATService(mctx MetricsCtx, lc fx.Lifecycle, cfg *config.Config, host h
...
@@ -519,11 +530,7 @@ func AutoNATService(mctx MetricsCtx, lc fx.Lifecycle, cfg *config.Config, host h
return
err
return
err
}
}
func
Pubsub
(
mctx
MetricsCtx
,
lc
fx
.
Lifecycle
,
host
host
.
Host
,
bcfg
*
BuildCfg
,
cfg
*
config
.
Config
)
(
service
*
pubsub
.
PubSub
,
err
error
)
{
func
Pubsub
(
mctx
MetricsCtx
,
lc
fx
.
Lifecycle
,
host
host
.
Host
,
cfg
*
config
.
Config
)
(
service
*
pubsub
.
PubSub
,
err
error
)
{
if
!
(
bcfg
.
getOpt
(
"pubsub"
)
||
bcfg
.
getOpt
(
"ipnsps"
))
{
return
nil
,
nil
// TODO: mark optional
}
var
pubsubOptions
[]
pubsub
.
Option
var
pubsubOptions
[]
pubsub
.
Option
if
cfg
.
Pubsub
.
DisableSigning
{
if
cfg
.
Pubsub
.
DisableSigning
{
pubsubOptions
=
append
(
pubsubOptions
,
pubsub
.
WithMessageSigning
(
false
))
pubsubOptions
=
append
(
pubsubOptions
,
pubsub
.
WithMessageSigning
(
false
))
...
@@ -581,17 +588,3 @@ func StartListening(host host.Host, cfg *config.Config) error {
...
@@ -581,17 +588,3 @@ func StartListening(host host.Host, cfg *config.Config) error {
log
.
Infof
(
"Swarm listening at: %s"
,
addrs
)
log
.
Infof
(
"Swarm listening at: %s"
,
addrs
)
return
nil
return
nil
}
}
func
P2PHostOption
(
bcfg
*
BuildCfg
)
(
hostOption
HostOption
,
err
error
)
{
hostOption
=
bcfg
.
Host
if
bcfg
.
DisableEncryptedConnections
{
innerHostOption
:=
hostOption
hostOption
=
func
(
ctx
context
.
Context
,
id
peer
.
ID
,
ps
peerstore
.
Peerstore
,
options
...
libp2p
.
Option
)
(
host
.
Host
,
error
)
{
return
innerHostOption
(
ctx
,
id
,
ps
,
append
(
options
,
libp2p
.
NoSecurity
)
...
)
}
// TODO: shouldn't this be Errorf to guarantee visibility?
log
.
Warningf
(
`Your IPFS node has been configured to run WITHOUT ENCRYPTED CONNECTIONS.
You will not be able to connect to any nodes configured to use encrypted connections`
)
}
return
hostOption
,
nil
}
core/node/storage.go
浏览文件 @
fd0c06a8
...
@@ -37,46 +37,48 @@ func DatastoreCtor(repo repo.Repo) datastore.Datastore {
...
@@ -37,46 +37,48 @@ func DatastoreCtor(repo repo.Repo) datastore.Datastore {
type
BaseBlocks
blockstore
.
Blockstore
type
BaseBlocks
blockstore
.
Blockstore
func
BaseBlockstoreCtor
(
mctx
MetricsCtx
,
repo
repo
.
Repo
,
cfg
*
config
.
Config
,
bcfg
*
BuildCfg
,
lc
fx
.
Lifecycle
)
(
bs
BaseBlocks
,
err
error
)
{
func
BaseBlockstoreCtor
(
permanent
bool
,
nilRepo
bool
)
func
(
mctx
MetricsCtx
,
repo
repo
.
Repo
,
cfg
*
config
.
Config
,
lc
fx
.
Lifecycle
)
(
bs
BaseBlocks
,
err
error
)
{
rds
:=
&
retrystore
.
Datastore
{
return
func
(
mctx
MetricsCtx
,
repo
repo
.
Repo
,
cfg
*
config
.
Config
,
lc
fx
.
Lifecycle
)
(
bs
BaseBlocks
,
err
error
)
{
Batching
:
repo
.
Datastore
(),
rds
:=
&
retrystore
.
Datastore
{
Delay
:
time
.
Millisecond
*
200
,
Batching
:
repo
.
Datastore
(),
Retries
:
6
,
Delay
:
time
.
Millisecond
*
200
,
TempErrFunc
:
isTooManyFDError
,
Retries
:
6
,
}
TempErrFunc
:
isTooManyFDError
,
// hash security
}
bs
=
blockstore
.
NewBlockstore
(
rds
)
// hash security
bs
=
&
verifbs
.
VerifBS
{
Blockstore
:
bs
}
bs
=
blockstore
.
NewBlockstore
(
rds
)
bs
=
&
verifbs
.
VerifBS
{
Blockstore
:
bs
}
opts
:=
blockstore
.
DefaultCacheOpts
()
opts
.
HasBloomFilterSize
=
cfg
.
Datastore
.
BloomFilterSize
if
!
bcfg
.
Permanent
{
opts
.
HasBloomFilterSize
=
0
}
if
!
bcfg
.
NilRepo
{
opts
:=
blockstore
.
DefaultCacheOpts
()
ctx
,
cancel
:=
context
.
WithCancel
(
mctx
)
opts
.
HasBloomFilterSize
=
cfg
.
Datastore
.
BloomFilterSize
if
!
permanent
{
lc
.
Append
(
fx
.
Hook
{
opts
.
HasBloomFilterSize
=
0
OnStop
:
func
(
context
context
.
Context
)
error
{
cancel
()
return
nil
},
})
bs
,
err
=
blockstore
.
CachedBlockstore
(
ctx
,
bs
,
opts
)
if
err
!=
nil
{
return
nil
,
err
}
}
}
bs
=
blockstore
.
NewIdStore
(
bs
)
if
!
nilRepo
{
bs
=
cidv0v1
.
NewBlockstore
(
bs
)
ctx
,
cancel
:=
context
.
WithCancel
(
mctx
)
lc
.
Append
(
fx
.
Hook
{
OnStop
:
func
(
context
context
.
Context
)
error
{
cancel
()
return
nil
},
})
bs
,
err
=
blockstore
.
CachedBlockstore
(
ctx
,
bs
,
opts
)
if
err
!=
nil
{
return
nil
,
err
}
}
if
cfg
.
Datastore
.
HashOnRead
{
// TODO: review: this is how it was done originally, is there a reason we can't just pass this directly?
bs
=
blockstore
.
NewIdStore
(
bs
)
bs
.
HashOnRead
(
true
)
bs
=
cidv0v1
.
NewBlockstore
(
bs
)
}
return
if
cfg
.
Datastore
.
HashOnRead
{
// TODO: review: this is how it was done originally, is there a reason we can't just pass this directly?
bs
.
HashOnRead
(
true
)
}
return
}
}
}
func
GcBlockstoreCtor
(
repo
repo
.
Repo
,
bb
BaseBlocks
,
cfg
*
config
.
Config
)
(
gclocker
blockstore
.
GCLocker
,
gcbs
blockstore
.
GCBlockstore
,
bs
blockstore
.
Blockstore
,
fstore
*
filestore
.
Filestore
)
{
func
GcBlockstoreCtor
(
repo
repo
.
Repo
,
bb
BaseBlocks
,
cfg
*
config
.
Config
)
(
gclocker
blockstore
.
GCLocker
,
gcbs
blockstore
.
GCBlockstore
,
bs
blockstore
.
Blockstore
,
fstore
*
filestore
.
Filestore
)
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论