From 872a0eebf0626bc070341241148435b53bab8f14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrei=20B=C4=83ncioiu?= Date: Wed, 17 Jul 2024 14:22:37 +0300 Subject: [PATCH] Optimize DisplayProcessTxDetails. Early exit if log level is not TRACE. --- process/common.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/process/common.go b/process/common.go index f06e0d00091..e8c9c7504ff 100644 --- a/process/common.go +++ b/process/common.go @@ -680,6 +680,10 @@ func DisplayProcessTxDetails( txHash []byte, addressPubkeyConverter core.PubkeyConverter, ) { + if log.GetLevel() > logger.LogTrace { + return + } + if !check.IfNil(accountHandler) { account, ok := accountHandler.(state.UserAccountHandler) if ok {