mirror of
https://github.com/bisq-network/bisq.git
synced 2024-11-19 18:03:12 +01:00
Improve logging
This commit is contained in:
parent
d57f6ad3d2
commit
c63ecb1ec3
@ -207,7 +207,7 @@ public abstract class BsqNode implements DaoSetupService {
|
||||
// height we have no block but chainHeight is initially set to genesis height (bad design ;-( but a bit tricky
|
||||
// to change now as it used in many areas.)
|
||||
if (daoStateService.getBlockAtHeight(rawBlock.getHeight()).isPresent()) {
|
||||
log.info("We have already a block with the height of the new block. Height of new block={}", rawBlock.getHeight());
|
||||
log.debug("We have already a block with the height of the new block. Height of new block={}", rawBlock.getHeight());
|
||||
return Optional.empty();
|
||||
}
|
||||
|
||||
|
@ -146,6 +146,7 @@ public class LiteNode extends BsqNode {
|
||||
// 144 blocks a day would result in about 4000 in a month, so if a user downloads the app after 1 months latest
|
||||
// release it will be a bit of a performance hit. It is a one time event as the snapshots gets created and be
|
||||
// used at next startup.
|
||||
long ts = System.currentTimeMillis();
|
||||
for (RawBlock block : blockList) {
|
||||
try {
|
||||
doParseBlock(block);
|
||||
@ -154,6 +155,7 @@ public class LiteNode extends BsqNode {
|
||||
break;
|
||||
}
|
||||
}
|
||||
log.info("Parsing {} blocks took {} seconds.", blockList.size(), (System.currentTimeMillis() - ts) / 1000d);
|
||||
|
||||
onParseBlockChainComplete();
|
||||
}
|
||||
|
@ -115,7 +115,9 @@ public class BlockParser {
|
||||
genesisBlockHeight,
|
||||
genesisTotalSupply)
|
||||
.ifPresent(txList::add));
|
||||
log.info("parseBsqTxs took {} ms", rawBlock.getRawTxs().size(), System.currentTimeMillis() - startTs);
|
||||
|
||||
if (System.currentTimeMillis() - startTs > 0)
|
||||
log.info("parseBsqTxs took {} ms", rawBlock.getRawTxs().size(), System.currentTimeMillis() - startTs);
|
||||
|
||||
daoStateService.onParseBlockComplete(block);
|
||||
return block;
|
||||
|
Loading…
Reference in New Issue
Block a user