lotus/lib/sectorbuilder/mock.go

28 lines
577 B
Go
Raw Normal View History

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