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

Method summaryLocalKvs

ethstorage/scanner/worker.go:291–298  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

289}
290
291func (s *Worker) summaryLocalKvs() (uint64, string) {
292 kvEntryCountOnChain := s.sm.KvEntryCount()
293 if kvEntryCountOnChain == 0 {
294 s.lg.Info("No KV entries found in local storage")
295 return 0, "[]"
296 }
297 return summaryLocalKvs(s.sm.Shards(), s.sm.KvEntries(), kvEntryCountOnChain-1)
298}
299
300// Calculate the total number of KV entries stored locally
301func summaryLocalKvs(shards []uint64, kvEntries, lastKvIdx uint64) (uint64, string) {

Callers 3

getKvsInBatchMethod · 0.95
startReporterMethod · 0.80
logStatsMethod · 0.80

Calls 4

summaryLocalKvsFunction · 0.85
KvEntryCountMethod · 0.65
ShardsMethod · 0.65
KvEntriesMethod · 0.65

Tested by

no test coverage detected