fix storage miner sectorbuilder construction
This commit is contained in:
parent
422e25c8e6
commit
c92b9d5a0d
@ -139,20 +139,28 @@ var initCmd = &cli.Command{
|
|||||||
}
|
}
|
||||||
|
|
||||||
oldsb, err := sectorbuilder.New(§orbuilder.Config{
|
oldsb, err := sectorbuilder.New(§orbuilder.Config{
|
||||||
SectorSize: 1024,
|
SectorSize: 1024,
|
||||||
SealedDir: filepath.Join(pssb, "sealed"),
|
WorkerThreads: 2,
|
||||||
CacheDir: filepath.Join(pssb, "cache"),
|
SealedDir: filepath.Join(pssb, "sealed"),
|
||||||
StagedDir: filepath.Join(pssb, "staging"),
|
CacheDir: filepath.Join(pssb, "cache"),
|
||||||
MetadataDir: filepath.Join(pssb, "meta"),
|
StagedDir: filepath.Join(pssb, "staging"),
|
||||||
|
MetadataDir: filepath.Join(pssb, "meta"),
|
||||||
}, oldmds)
|
}, oldmds)
|
||||||
|
if err != nil {
|
||||||
|
return xerrors.Errorf("failed to open up preseal sectorbuilder: %w", err)
|
||||||
|
}
|
||||||
|
|
||||||
nsb, err := sectorbuilder.New(§orbuilder.Config{
|
nsb, err := sectorbuilder.New(§orbuilder.Config{
|
||||||
SectorSize: 1024,
|
SectorSize: 1024,
|
||||||
SealedDir: filepath.Join(lr.Path(), "sealed"),
|
WorkerThreads: 2,
|
||||||
CacheDir: filepath.Join(lr.Path(), "cache"),
|
SealedDir: filepath.Join(lr.Path(), "sealed"),
|
||||||
StagedDir: filepath.Join(lr.Path(), "staging"),
|
CacheDir: filepath.Join(lr.Path(), "cache"),
|
||||||
MetadataDir: filepath.Join(lr.Path(), "meta"),
|
StagedDir: filepath.Join(lr.Path(), "staging"),
|
||||||
|
MetadataDir: filepath.Join(lr.Path(), "meta"),
|
||||||
}, mds)
|
}, mds)
|
||||||
|
if err != nil {
|
||||||
|
return xerrors.Errorf("failed to open up sectorbuilder: %w", err)
|
||||||
|
}
|
||||||
|
|
||||||
if err := nsb.ImportFrom(oldsb); err != nil {
|
if err := nsb.ImportFrom(oldsb); err != nil {
|
||||||
return err
|
return err
|
||||||
|
Loading…
Reference in New Issue
Block a user