Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
go-sectorbuilder
Commits
42d67726
Commit
42d67726
authored
Feb 03, 2020
by
Łukasz Magiera
Browse files
Create cache dir later
parent
6b57024f
Changes
1
Hide whitespace changes
Inline
Side-by-side
sectorbuild_cgo.go
View file @
42d67726
...
...
@@ -169,9 +169,6 @@ func (sb *SectorBuilder) SealPreCommit(ctx context.Context, sectorID uint64, tic
if
err
!=
nil
{
return
RawSealPreCommitOutput
{},
xerrors
.
Errorf
(
"getting cache dir: %w"
,
err
)
}
if
err
:=
os
.
Mkdir
(
string
(
cacheDir
),
0755
);
err
!=
nil
{
return
RawSealPreCommitOutput
{},
err
}
sealedPath
,
err
:=
sfs
.
ForceAllocSector
(
fs
.
DataSealed
,
sb
.
Miner
,
sb
.
ssize
,
true
,
sectorID
)
if
err
!=
nil
{
...
...
@@ -240,6 +237,10 @@ func (sb *SectorBuilder) SealPreCommit(ctx context.Context, sectorID uint64, tic
return
RawSealPreCommitOutput
{},
err
}
if
err
:=
os
.
Mkdir
(
string
(
cacheDir
),
0755
);
err
!=
nil
{
return
RawSealPreCommitOutput
{},
err
}
var
sum
uint64
for
_
,
piece
:=
range
pieces
{
sum
+=
piece
.
Size
...
...
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