attempt to fix the DI loading, still not working

This commit is contained in:
whyrusleeping 2020-01-08 20:51:18 -08:00
parent 60969c69a7
commit cc56389dbb
3 changed files with 5 additions and 5 deletions

View File

@ -92,7 +92,7 @@ func SectorBuilderConfig(storagePath string, threads uint, noprecommit, nocommit
} }
} }
func StorageMiner(mctx helpers.MetricsCtx, lc fx.Lifecycle, api api.FullNode, h host.Host, ds dtypes.MetadataDS, sb *sectorbuilder.SectorBuilder, tktFn storage.TicketFn) (*storage.Miner, error) { func StorageMiner(mctx helpers.MetricsCtx, lc fx.Lifecycle, api api.FullNode, h host.Host, ds dtypes.MetadataDS, sb storage.SectorBuilder, tktFn storage.TicketFn) (*storage.Miner, error) {
maddr, err := minerAddrFromDS(ds) maddr, err := minerAddrFromDS(ds)
if err != nil { if err != nil {
return nil, err return nil, err

View File

@ -159,8 +159,8 @@ type SectorBuilderEpp struct {
sb *sectorbuilder.SectorBuilder sb *sectorbuilder.SectorBuilder
} }
func NewElectionPoStProver(sb *sectorbuilder.SectorBuilder) *SectorBuilderEpp { func NewElectionPoStProver(sb SectorBuilder) *SectorBuilderEpp {
return &SectorBuilderEpp{sb} return &SectorBuilderEpp{sb.(*sectorbuilder.SectorBuilder)}
} }
var _ gen.ElectionPoStProver = (*SectorBuilderEpp)(nil) var _ gen.ElectionPoStProver = (*SectorBuilderEpp)(nil)

View File

@ -47,10 +47,10 @@ type SectorBlocks struct {
keyLk sync.Mutex keyLk sync.Mutex
} }
func NewSectorBlocks(miner *storage.Miner, ds dtypes.MetadataDS, sb *sectorbuilder.SectorBuilder) *SectorBlocks { func NewSectorBlocks(miner *storage.Miner, ds dtypes.MetadataDS, sb storage.SectorBuilder) *SectorBlocks {
sbc := &SectorBlocks{ sbc := &SectorBlocks{
Miner: miner, Miner: miner,
sb: sb, sb: sb.(*sectorbuilder.SectorBuilder),
intermediate: blockstore.NewBlockstore(namespace.Wrap(ds, imBlocksPrefix)), intermediate: blockstore.NewBlockstore(namespace.Wrap(ds, imBlocksPrefix)),