MCPcopy Create free account
hub / github.com/ethstorage/es-node / start

Method start

ethstorage/scanner/scanner.go:96–120  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

94}
95
96func (s *Scanner) start() {
97 s.mu.Lock()
98 if s.running {
99 s.mu.Unlock()
100 return
101 }
102 s.running = true
103 s.mu.Unlock()
104
105 if s.cfg.Mode&modeSetMeta != 0 {
106 s.launchScanLoop(s.metaScanLoopRuntime())
107 }
108 if s.cfg.Mode&modeSetBlob != 0 {
109 s.launchScanLoop(s.blobScanLoopRuntime())
110 }
111 if s.cfg.Mode&modeSetBlock != 0 {
112 s.launchScanLoop(s.blockScanLoopRuntime())
113 }
114
115 s.lg.Info("Scanner started", "mode", s.cfg.Mode.String())
116
117 s.startReporter()
118
119 s.launchFixLoop(time.Minute * fixingInterval)
120}
121
122func (s *Scanner) launchScanLoop(rt *scanLoopRuntime) {
123 s.wg.Add(1)

Callers 1

updateMethod · 0.95

Calls 7

launchScanLoopMethod · 0.95
metaScanLoopRuntimeMethod · 0.95
blobScanLoopRuntimeMethod · 0.95
blockScanLoopRuntimeMethod · 0.95
startReporterMethod · 0.95
launchFixLoopMethod · 0.95
StringMethod · 0.45

Tested by

no test coverage detected