2019-11-05 03:42:13 +00:00
|
|
|
package sectorbuilder
|
|
|
|
|
|
|
|
import (
|
2019-12-19 20:13:17 +00:00
|
|
|
"github.com/filecoin-project/go-address"
|
2019-11-08 18:49:36 +00:00
|
|
|
"github.com/filecoin-project/lotus/node/modules/dtypes"
|
2019-11-05 03:42:13 +00:00
|
|
|
)
|
|
|
|
|
2019-11-08 18:55:23 +00:00
|
|
|
func TempSectorbuilderDir(dir string, sectorSize uint64, ds dtypes.MetadataDS) (*SectorBuilder, error) {
|
2019-11-05 03:42:13 +00:00
|
|
|
addr, err := address.NewFromString("t3vfxagwiegrywptkbmyohqqbfzd7xzbryjydmxso4hfhgsnv6apddyihltsbiikjf3lm7x2myiaxhuc77capq")
|
|
|
|
if err != nil {
|
2019-11-08 18:55:23 +00:00
|
|
|
return nil, err
|
2019-11-05 03:42:13 +00:00
|
|
|
}
|
|
|
|
|
2019-11-05 17:53:19 +00:00
|
|
|
sb, err := New(&Config{
|
2019-11-07 16:39:27 +00:00
|
|
|
SectorSize: sectorSize,
|
|
|
|
|
2019-12-16 13:49:58 +00:00
|
|
|
Dir: dir,
|
2019-11-05 17:53:19 +00:00
|
|
|
|
|
|
|
WorkerThreads: 2,
|
2019-11-05 18:40:51 +00:00
|
|
|
Miner: addr,
|
2019-11-08 20:30:50 +00:00
|
|
|
}, ds)
|
2019-11-05 03:42:13 +00:00
|
|
|
if err != nil {
|
2019-11-08 18:55:23 +00:00
|
|
|
return nil, err
|
2019-11-05 03:42:13 +00:00
|
|
|
}
|
|
|
|
|
2019-11-08 18:55:23 +00:00
|
|
|
return sb, nil
|
2019-11-05 03:42:13 +00:00
|
|
|
}
|