Skip to content

Commit 88c0fe1

Browse files
authored
Merge pull request #4644 from halibobo1205/db_log_opt
refactor(db): optimize log printing
2 parents dd7e36b + 56eae01 commit 88c0fe1

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

framework/src/main/java/org/tron/core/db/Manager.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1396,8 +1396,12 @@ public TransactionInfo processTransaction(final TransactionCapsule trxCap, Block
13961396
}
13971397
long cost = System.currentTimeMillis() - start;
13981398
if (cost > 100) {
1399-
logger.info("Process transaction {} cost {}.",
1400-
Hex.toHexString(transactionInfo.getId()), cost);
1399+
String type = "broadcast";
1400+
if (Objects.nonNull(blockCap)) {
1401+
type = blockCap.hasWitnessSignature() ? "apply" : "pack";
1402+
}
1403+
logger.info("Process transaction {} cost {} ms during {}, {}",
1404+
Hex.toHexString(transactionInfo.getId()), cost, type, contract.getType().name());
14011405
}
14021406
Metrics.histogramObserve(requestTimer);
14031407
return transactionInfo.getInstance();

0 commit comments

Comments
 (0)