MCPcopy Create free account
hub / github.com/DNAProject/DNA / logCurrBlockHeight

Function logCurrBlockHeight

main.go:421–435  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

419}
420
421func logCurrBlockHeight() {
422 ticker := time.NewTicker(config.DEFAULT_GEN_BLOCK_TIME * time.Second)
423 defer ticker.Stop()
424 for {
425 select {
426 case <-ticker.C:
427 log.Infof("CurrentBlockHeight = %d", ledger.DefLedger.GetCurrentBlockHeight())
428 isNeedNewFile := log.CheckIfNeedNewFile()
429 if isNeedNewFile {
430 log.ClosePrintLog()
431 log.InitLog(int(config.DefConfig.Common.LogLevel), log.PATH, log.Stdout)
432 }
433 }
434 }
435}
436
437func setMaxOpenFiles() {
438 max, err := fdlimit.Maximum()

Callers 1

startDNAFunction · 0.85

Calls 3

InfofMethod · 0.80
StopMethod · 0.65
GetCurrentBlockHeightMethod · 0.65

Tested by

no test coverage detected