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-dms3
Commits
59805f03
Unverified
Commit
59805f03
authored
Aug 31, 2018
by
Steven Allen
Committed by
GitHub
Aug 31, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #5414 from ipfs/nit/no-caching-nil-repo
don't bother caching if we're using a nil repo
parents
1b4972b4
5bc843e5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
8 deletions
+10
-8
core/builder.go
core/builder.go
+10
-8
No files found.
core/builder.go
View file @
59805f03
...
...
@@ -205,22 +205,24 @@ func setupNode(ctx context.Context, n *IpfsNode, cfg *BuildCfg) error {
opts
.
HasBloomFilterSize
=
0
}
wbs
,
err
:=
bstore
.
CachedBlockstore
(
ctx
,
bs
,
opts
)
if
err
!=
nil
{
return
err
if
!
cfg
.
NilRepo
{
bs
,
err
=
bstore
.
CachedBlockstore
(
ctx
,
bs
,
opts
)
if
err
!=
nil
{
return
err
}
}
w
bs
=
bstore
.
NewIdStore
(
w
bs
)
bs
=
bstore
.
NewIdStore
(
bs
)
w
bs
=
cidv0v1
.
NewBlockstore
(
w
bs
)
bs
=
cidv0v1
.
NewBlockstore
(
bs
)
n
.
BaseBlocks
=
w
bs
n
.
BaseBlocks
=
bs
n
.
GCLocker
=
bstore
.
NewGCLocker
()
n
.
Blockstore
=
bstore
.
NewGCBlockstore
(
w
bs
,
n
.
GCLocker
)
n
.
Blockstore
=
bstore
.
NewGCBlockstore
(
bs
,
n
.
GCLocker
)
if
conf
.
Experimental
.
FilestoreEnabled
||
conf
.
Experimental
.
UrlstoreEnabled
{
// hash security
n
.
Filestore
=
filestore
.
NewFilestore
(
w
bs
,
n
.
Repo
.
FileManager
())
n
.
Filestore
=
filestore
.
NewFilestore
(
bs
,
n
.
Repo
.
FileManager
())
n
.
Blockstore
=
bstore
.
NewGCBlockstore
(
n
.
Filestore
,
n
.
GCLocker
)
n
.
Blockstore
=
&
verifbs
.
VerifBSGC
{
GCBlockstore
:
n
.
Blockstore
}
}
...
...
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