3
0
mirror of https://github.com/Qortal/altcoinj.git synced 2025-02-07 06:44:16 +00:00

Log the block chain height to debug, not info.

This commit is contained in:
Mike Hearn 2011-08-05 14:26:29 +00:00
parent dd8208c135
commit 78bdd09189

View File

@ -204,7 +204,7 @@ public class BlockChain {
if (storedPrev.equals(chainHead)) { if (storedPrev.equals(chainHead)) {
// This block connects to the best known block, it is a normal continuation of the system. // This block connects to the best known block, it is a normal continuation of the system.
setChainHead(newStoredBlock); setChainHead(newStoredBlock);
log.info("Chain is now {} blocks high", chainHead.getHeight()); log.debug("Chain is now {} blocks high", chainHead.getHeight());
if (newTransactions != null) if (newTransactions != null)
sendTransactionsToWallet(newStoredBlock, NewBlockType.BEST_CHAIN, newTransactions); sendTransactionsToWallet(newStoredBlock, NewBlockType.BEST_CHAIN, newTransactions);
} else { } else {
@ -391,7 +391,7 @@ public class BlockChain {
} }
cursor = blockStore.get(cursor.getHeader().getPrevBlockHash()); cursor = blockStore.get(cursor.getHeader().getPrevBlockHash());
} }
log.info("Difficulty transition traversal took {}msec", System.currentTimeMillis() - now); log.debug("Difficulty transition traversal took {}msec", System.currentTimeMillis() - now);
Block blockIntervalAgo = cursor.getHeader(); Block blockIntervalAgo = cursor.getHeader();
int timespan = (int) (prev.getTimeSeconds() - blockIntervalAgo.getTimeSeconds()); int timespan = (int) (prev.getTimeSeconds() - blockIntervalAgo.getTimeSeconds());
@ -406,7 +406,7 @@ public class BlockChain {
newDifficulty = newDifficulty.divide(BigInteger.valueOf(params.targetTimespan)); newDifficulty = newDifficulty.divide(BigInteger.valueOf(params.targetTimespan));
if (newDifficulty.compareTo(params.proofOfWorkLimit) > 0) { if (newDifficulty.compareTo(params.proofOfWorkLimit) > 0) {
log.warn("Difficulty hit proof of work limit: {}", newDifficulty.toString(16)); log.debug("Difficulty hit proof of work limit: {}", newDifficulty.toString(16));
newDifficulty = params.proofOfWorkLimit; newDifficulty = params.proofOfWorkLimit;
} }