move sectorbuilder DI stuff to Online option

This commit is contained in:
whyrusleeping 2019-07-29 12:11:55 -07:00
parent 8e840139bd
commit 259b38eb55

View File

@ -212,7 +212,9 @@ func Online() Option {
),
// Storage miner
ApplyIf(func(s *Settings) bool { return s.nodeType == nodeStorageMiner },
Override(new(*sectorbuilder.SectorBuilder), sectorbuilder.New),
),
)
}
@ -247,10 +249,6 @@ func Config(cfg *config.Root) Option {
ApplyIf(func(s *Settings) bool { return s.Online },
Override(StartListeningKey, lp2p.StartListening(cfg.Libp2p.ListenAddresses)),
),
ApplyIf(func(s *Settings) bool { return s.nodeType == nodeStorageMiner },
Override(new(*sectorbuilder.SectorBuilder), sectorbuilder.New),
),
)
}