move sectorbuilder DI stuff to Online option
This commit is contained in:
parent
8e840139bd
commit
259b38eb55
@ -212,7 +212,9 @@ func Online() Option {
|
|||||||
),
|
),
|
||||||
|
|
||||||
// Storage miner
|
// 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 },
|
ApplyIf(func(s *Settings) bool { return s.Online },
|
||||||
Override(StartListeningKey, lp2p.StartListening(cfg.Libp2p.ListenAddresses)),
|
Override(StartListeningKey, lp2p.StartListening(cfg.Libp2p.ListenAddresses)),
|
||||||
),
|
),
|
||||||
|
|
||||||
ApplyIf(func(s *Settings) bool { return s.nodeType == nodeStorageMiner },
|
|
||||||
Override(new(*sectorbuilder.SectorBuilder), sectorbuilder.New),
|
|
||||||
),
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user