3
0
mirror of https://github.com/Qortal/altcoinj.git synced 2025-01-31 23:32:16 +00:00

Don't print difficulty transition times when it's less than 50 msec.

This commit is contained in:
Mike Hearn 2013-02-27 15:17:29 +01:00
parent 2e895e4e09
commit 301299cff9

View File

@ -732,7 +732,9 @@ public abstract class AbstractBlockChain {
} }
cursor = blockStore.get(cursor.getHeader().getPrevBlockHash()); cursor = blockStore.get(cursor.getHeader().getPrevBlockHash());
} }
log.info("Difficulty transition traversal took {}msec", System.currentTimeMillis() - now); long elapsed = System.currentTimeMillis() - now;
if (elapsed > 50)
log.info("Difficulty transition traversal took {}msec", elapsed);
Block blockIntervalAgo = cursor.getHeader(); Block blockIntervalAgo = cursor.getHeader();
int timespan = (int) (prev.getTimeSeconds() - blockIntervalAgo.getTimeSeconds()); int timespan = (int) (prev.getTimeSeconds() - blockIntervalAgo.getTimeSeconds());