Report only every 1024'th getBlock

This commit is contained in:
Bulat-Ziganshin 2022-09-08 12:26:24 +03:00
parent 7d6330b938
commit 0bbecc5092
1 changed files with 4 additions and 1 deletions

View File

@ -75,7 +75,10 @@ method getBlock*(
## Save a copy to the cache if present in the database but not in the cache
##
notice " == getBlock"
var counter {.global.} = 0
inc(counter)
if counter mod 1024 == 0:
echo counter
if not self.cache.isNil:
trace "Getting block from cache or database", cid